[android-developers] Re: Socket connection question

2010-07-09 Thread Indicator Veritatis
The normal Java socket classes (Socket, DatagramSocket, SocketImpl, DatagramSocketImpl, ServerSocket) do force you to choose between TCP (stream) and UDP (datagram). They give you no control over choosing the layers below IP, so you cannot choose between WiFi and cellular. On Jul 8, 5:20 pm,

Re: [android-developers] Re: Socket connection question

2010-07-09 Thread Alex Xin
Thanks for explanation. Are there possibles if I use NDK to do that? On Fri, Jul 9, 2010 at 5:12 PM, Indicator Veritatis mej1...@yahoo.comwrote: The normal Java socket classes (Socket, DatagramSocket, SocketImpl, DatagramSocketImpl, ServerSocket) do force you to choose between TCP (stream)

[android-developers] Re: Socket connection question

2010-07-08 Thread JoksanCPEN
I don't think so. I think that the problem here is that carriers doesn't want people using direct port connections over their network. If you find something let me know, Ohh and if you know how to read socket on android let me know also. On Jul 5, 1:48 am, Alex Xin xinxi...@gmail.com wrote:

Re: [android-developers] Re: Socket connection question

2010-07-08 Thread Kostya Vasilyev
Alex, If you mean 3G vs. Wifi - I think the answer is no. I believe Android maintains only one data connection option at a time, although it can be either Wifi, or, in its absence, cellular (HSDPA / 3G / EDGE / GPRS, depending on the phone and the network). -- Kostya 08.07.2010 19:34,

[android-developers] Re: Socket connection question

2010-07-08 Thread piwaf
But you can defenitly open sockets, use the normal java socket classes. But I don't know if you can choose the network type to use. On Jul 8, 11:41 am, Kostya Vasilyev kmans...@gmail.com wrote: Alex, If you mean 3G vs. Wifi - I think the answer is no. I believe Android maintains only one

Re: [android-developers] Re: Socket connection question

2010-07-08 Thread Miguel Morales
This is a fairly straight forward process, at least using regular tcp. You can't easily use the phone as a server from what I've tried. Other than that, it's pretty straight forward, something like: Socket sock = new Socket(hostname, port); InputStream isr = sock.getInputStream(); OutputStream