I want to send data(datastream, not files) from a PC to a real android
phone via USB.
I coded and set the phone to be a SERVER ,PC to be a CLIENT, and it
worded.
And, when I set the Simulator to be a CLIENT,PC to be a SERVER , it
worded too.
BUT, when I set the REAL Phone to be a CLIENT,PC to be a SERVER , it
did not word at all!!!
Code is like:
PC:
Runtime.getRuntime().exec("adb forward tcp:12580 tcp:10086");
serverSocket = new ServerSocket(12580);
Android:
socket = new Socket(InetAddress.getByName("127.0.0.1"), 12580);
//While on the Simulator use "10.0.2.2" it works!!!
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en