user250360
user250360

Reputation: 23

Data transfer between two android devices which are on different networks

I am working on one project in which two android devices which are in different network need to transfer some data. Both device will have internet connection. It will be either Wifi or GSM provider.
Consider the following cases:

  1. If one Android device has GSM network and
    another device in some other place which has Wifi network
  2. If one Android device has GSM network and another device has GSM network

How to transfer data in such cases?

I don't want to use server in between.

Please let me know how do I solve this issue. Any clue or any links which will help me. So far I didn't find any such things. Please help me...

Upvotes: 1

Views: 240

Answers (2)

scottt
scottt

Reputation: 8371

Unless a device has been configured with an external IP address, which is very unlikely (impossible?) on a cellular network, there won't be a way to directly contact it from an external device. Even on WiFi, most devices will never have an externally defined address.

If you had administrative control over a directly connected and externally addressed router, you could port-forward traffic to a single device, but that's likely not the solution you're after.

A much easier approach is to use one of the services that let you define a back-end w/o a lot of setup or costs. The most popular one is probably Parse.

Upvotes: 0

Marche101
Marche101

Reputation: 825

Short Answer: You're going to have to use a server.

Long Answer: You could use bluetooth if the location is close enough or maybe Wifi Direct although I haven't personally used the latter. Although, ultimately a server will be the best option. If you don't know a lot about backend development I could recommend parse.com as a good service that makes creating backends very easy and has fairly high usage limits before you have to pay.

Upvotes: 0

Related Questions