[android-developers] Re: Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.
Thanks to your advice, I made it at last. //While on the Simulator use 10.0.2.2 it works That is, when I tried to send data stream from Simulator to PC, as PC's address being 10.0.2.2, the PC can receive data stream from Simulator(10.0.2.2). I just guess there is somewhat THREAD running on the Simulator. And you said that I should setup a network between the PC and the android phone, I tried the Internet Tethering. And now, it works! I don't get what is reverse tethering yet, but I will go in deeper steps. PS: ag means I will try again. On 2月19日, 上午2时49分, Lew lewbl...@gmail.com wrote: vvis wrote: Thx [sic] a lot, I will try reverse tethering via USB, and connect the PC and the mobile phone ag.. I think that is the most immediate way to go. What does ag mean? Let me remind you: Lew wrote: There are problems with reverse tethering; tread carefully. Make sure you understand the Dark Side before you engage. For one, it only works on rooted phones. You didn't answer what I asked. Why is that? -- Lew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.
Thx a lot, I will try reverse tethering via USB, and connect the PC and the mobile phone ag.. I think that is the most immediate way to go. On 2月14日, 下午12时34分, Lew lewbl...@gmail.com wrote: vvis wrote: 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); This code fragment asks for a connection to port 12580 on the device itself. So you are asking the Android device to connect to a socket on the same Android device. Is that what you intended? //While on the Simulator use 10.0.2.2 it works!!! You don't show code or describe your configuration, so I'm not clear on what you mean by works. But generally you don't have a network connection between the device and your PC. It takes something called reverse tethering via USB. The emulator runs on the same network as its host, which is why you had no trouble there. When Googling the terminology myself just now, I came across this badly-written but potentially useful little article:http://www.codeproject.com/Articles/191930/Android-Usb-Port-Forwarding There are problems with reverse tethering; tread carefully. So you have two problems. You're trying to connect the Android device to itself, and you have no network connection from the device to the PC. -- Lew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.
Help me out.. Please.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.
Some words ware typed to be wrong, like WORD, it is WORK. Sorry.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.
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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en