Is there any other way of Communication between Two Android Devices without Using Sockets Programmed in Java ? Does Java provide some other way to do this stuff ?
Asked
Active
Viewed 196 times
-2
-
Like what? Networking basics don't change. – duffymo May 18 '16 at 09:08
-
Like text messaging, or IM, or something? Yup, no doubt. What are you trying to do? – Mathieu K. May 18 '16 at 09:13
-
Via a bluetooth.. [socket](https://developer.android.com/reference/android/bluetooth/BluetoothSocket.html), Phone calls, SMS, usind direct loudspeaker to microphone "connection" & some devices can also "communicate" via NFC, but beyond that, there is no other communication technology built into typical devices. So any practical communication uses a socket, at least under the hood. – zapl May 18 '16 at 09:13
-
@duffymo Java provides RMI and .Net Provides Remoting Concepts but Android doesn't have these concepts. So I wanna to know if Android has Some Latest Techniques ! – Ali May 18 '16 at 09:15
-
1see http://stackoverflow.com/questions/14326901/the-significance-of-java-rmi-please for some latest developments regarding RMI – zapl May 18 '16 at 09:31
-
There's of course the (obvious) option to let the communication happen trough a backend server. You can re-invent a wheel of your own or use [Google Cloud Messaging](https://developers.google.com/cloud-messaging/). And direct device-to-device communication of course has its own challenges as we are talking about mobile devices that might be far away from each other and might not even have a public IP address. – Markus Kauppinen May 18 '16 at 09:36
-
What do you think RMI is using underneath? – duffymo May 18 '16 at 10:21
1 Answers
0
Assuming Bluetooth is also not allowed, you can still connect two Android devices together.
You can do this with USB OTG. Some Android devices support this and Android has an official API that supports this.
You need an OTG Connector, a USB cable and one of those Android devices must support OTG.
API reference and examples:
https://developer.android.com/guide/topics/connectivity/usb/index.html
http://android-developers.blogspot.com/2011/05/bright-idea-android-open-accessories.html

Community
- 1
- 1

Programmer
- 121,791
- 22
- 236
- 328