I would like to have two or more Android apps on two or more different devices communicate with each other (e.g. for a local game).
Which options are there to get this done?
Just now, the following options come into my mind:
- communicate via WiFi (there has to be a WiFi network available)
- communicate via WFi Direct (quite difficult to set up for users)
- communicate via Google Play (? don’t know, if that’s possible)
- communicate using Bluetooth (? don’t know if that’s possible… Which BT profile would be needed for that)
- Google Cloud Messaging (Internet connection needed)
Are there any other communication methods I could use here? What would be the preferred or suggested (by Google?) approach to take?
In my scenario, the users are quite near to each other (max. 20 mtrs apart) and do not necessarily have an Internet connection. So, the more independent the solution is, the better for this scenario. (but Internet connection as a prerequisite would probably be ok…)
The data to be transmitted is not time-critical. A delay of 5 seconds might be okay and the amount of data is quite small (maybe 10 KB every 5 minutes or so).
Which option should be taken for this scenario? Is there some guidance from Google or some sample code?
Where can I find more information on that topic – I guess that I am neiter the first one nor the only one who needs this…