Thursday, July 8, 2010

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

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 osr = sock.getOutputStream();

Just google java tcp socket, or android tcp socket.

On Thu, Jul 8, 2010 at 5:20 PM, piwaf <jim@ahg.net> wrote:
> 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 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, 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:
>>
>> >> Hi,
>>
>> >> Are there any methods which I can use to establish a socket connection that
>> >> only use 3G network?
>>
>> >> Thank you a lot!
>>
>> >> Alex
>>
>> --
>> Kostya Vasilev -- WiFi Manager + pretty widget --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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
http://developingthedream.blogspot.com/,
http://diastrofunk.com,
http://www.youtube.com/user/revoltingx, ~Isaiah 55:8-9

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate