如何在两个Android设备之间传输数据?

I was wondering what options do we have to exchange data between two different android devices?

For example, User-A and User-B both installs my app. I would like User-A to send data (possibly just a simple message or user-A's location info) to User-B.

I will be glad for any useful examples or links.

Thanks!!!

Assuming user A and B are not physically close or on the same wlan, you're going to need a server between them. Most users are behind a NAT, so they won't be able to be sent data directly (they won't be able to open a listening socket and receive connection requests). You pretty much have to send the data from device A to a server, then have device B poll the server (or use GCM Push).

you can use bluetooth to send the data,

refer the following link

How to send a text message to a paired device through bluetooth in android?