7 messages in com.googlegroups.android-developersRe: [android-developers] Android to PC
FromSent OnAttachments
narok11919 Jan 2008 10:38 
Wink Saville19 Jan 2008 12:57 
narok11919 Jan 2008 17:00 
wink19 Jan 2008 20:27 
narok11919 Jan 2008 21:34 
Jose María González20 Jan 2008 04:00 
narok11924 Jan 2008 11:21 
Subject:Re: [android-developers] Android to PC
From:Wink Saville (w.@saville.com)
Date:01/19/2008 12:57:09 PM
List:com.googlegroups.android-developers

narok119 wrote:

I've tried to find the best way to connect between Android and Windows PC.

I think that the best way is use java.net.*(Socket and ServerSocket) but i am not sure about the IP of Emulator and my Windows (Emulator is running on Windows).

Sockets work quite well when initiating from Android to PC. To date I've been unable to have a PC connect to a Server running on Android.

But i have a question

Is the Emulator's IP same as my Windows's IP?

No

if the answer is YES , how can two same IP devices communcate together?

if the answer is NO , how can i findout my Emulator's IP becuase I've tried to run "ifconfig" to look for emulator's IP but nothing happend.

The ifconfig in Android has limited capability. You can get a better ifconfig via busybox and then you see that the address is 10.0.2.15. Another words its on it's own subnet and qemu/emulator uses the PC as a gateway at 10.0.2.2.

A version of busybox for Android can be gotten at: http://benno.id.au/blog/2007/11/14/android-busybox

Plz advice me.