you need to determine the ip of your computer and the appropriate port for the server. Client/Server should match.
On Dec 3, 12:43 am, Tantu <[email protected]> wrote: > i want to connect my phone to PC using socket communication and my > phone acts as a client in this communication. my code is working in > emulator but not in phone.It shows an error like this: > "java.net.SocketException: network unreachable in android" while > running. > > //code part// > socket = new Socket("127.0.0.1", 5228); -- 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

