The USB connection isn't going to help (unless your phone is seen as a network interface from the host computer, like the Motorola Milestone).

In general, cellular operators block ports and / or put your phone behind a NAT, which greatly complicates things.

One possibility is to use WiFi - if the phone and the computer connect to the same router, they'll end on the same subnet, and will be able to exchange TCP/IP traffic through that router, without "going outside".

Another possibility is to put a server "in the middle" - put it on the global Internet, so it's accessible from both the phone and the computer, and have it forward data between those two.

One specific, already defined and widely used, protocol for this is XMPP. There are client libraries for Android that you can leverage:

http://stackoverflow.com/questions/392785/xmpp-and-android

-- Kostya

02.03.2011 23:32, Miguel Morales ?????:
Sounds like a firewall issue.

On Mon, Feb 28, 2011 at 7:57 AM, vonengel <[email protected] <mailto:[email protected]>> wrote:

    Hi everybody,

    I am working on an application which communicates with different
    machines (Linux) via sockets.
    My problem is the following:
    I want to be able to connect from my phone (which is connected via
    USB) to the development machine. With the emulator, I just use the IP
    of the machine and it works. But when I am using an actual devices I
    can't connect to the machine, since the mobile is not in the same
    network.
    How do you solve this problem?

    Thanks in advance!
    Cheers,
    David

    --
    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]
    <mailto:[email protected]>
    To unsubscribe from this group, send email to
    [email protected]
    <mailto:android-developers%[email protected]>
    For more options, visit this group at
    http://groups.google.com/group/android-developers?hl=en




--
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com,
http://www.youtube.com/user/revoltingx
--
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


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
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

Reply via email to