I have an idea for an app on vacation that needs to communicate to other phones with the same app. While on vacation those phones might not all have internet as roaming can be very expensive. The data is not a lot: like 500 kB max would suffice (in json).
Every phone has a bit of info that all the other phones would like to know, but if it helps the info can be stored on 1 phone (master phone from now on) and shared later to the other phones when back home over internet.
Android, iPhone and Windows Phone
We can't assume they have NFC, IR or zigbee. Just the hardware almost every phone has like bluetooth, camera, microphone etc.
The easiest (and most supported) way of getting multiple devices to connect to each other is using WiFi. Since your goal is to achieve data transfer with no internet, the most appealing solution would be to use a Peer-to-Peer network structure.
The two major smartphone OS's (Android and iOS) have API's and documentation on creating and transferring data over a Peer-to-Peer network.
These two also have a means to encrypt the data being transferred.
Windows doesn't seem to have an API to allow multiple peers connected, but their Proximity Class will work for one device at a time.
I can give a few outlines over the different options in each major OS:
Android's WiFi P2P (peer-to-peer) API was created for transferring data without internet or another network.
From their documentation:
The Wi-Fi peer-to-peer (P2P) APIs allow applications to connect to nearby devices without needing to connect to a network or hotspot (Android's Wi-Fi P2P framework complies with the Wi-Fi Direct™ certification program). Wi-Fi P2P allows your application to quickly find and interact with nearby devices, at a range beyond the capabilities of Bluetooth.
Apple's Multipeer Connectivity.
Very similar to Android's P2P API, they claim:
The Multipeer Connectivity framework provides support for discovering services provided by nearby iOS devices using infrastructure Wi-Fi networks, peer-to-peer Wi-Fi, and Bluetooth personal area networks and subsequently communicating with those services by sending message-based data, streaming data, and resources (such as files).
Here is a decent looking tutorial on using Multipeer Connectivity.
Another iOS way of doing this, which is a bit of a mis-utilization(?) of the tool, is by using
However, I think that to get it to work for your purposes might result in a bit of a hack, since the "players" have to be using Game Center.
The only way (apparently) to connect phones in Windows Phone, is by using Proximity, however, that only gives you the option of connecting no more than two phones together.
Proximity is a great way to create a shared app experience between two instances of your app running on two different devices.
Those are options in each of the major mobile device OS's.
App usage could be something like:
Decide which device was going to be the "master", so that other devices can connect to it. It isn't required to know this before deploying the app, but there should be a way for the user to decide whether he is going to be a client (receiving data) or the server (pushing data).
Once it was decided between the group of devices which was going to be pushing data, that device would have to be registered as the server (in the Android P2P API, you can establish a "group owner"), and then start looking for peers by initializing the service.
Then, once the devices are connected to the master device, you can start pushing data. An additional bonus is that when using Android WiFi P2P, all communication is encrypted with WPA2, and with iOS, you can enable encryption using
MCEnableEncryption (however they state that is slows down data transfer rate).
Now you would just have to pick one method to go with, and make sure that all the phones ran that OS. Because these three methods of connectivity won't work together.
All of the three methods listed are done programmatically, so there should be no strange or odd things that your user will have to do. Searching for other devices, connecting, and transferring data can all be done within your app.
More help can be provided if the question is narrowed down to specific problems, but this should be enough data to get you started.