Additionally, if you're doing network communication from the main
thread you should see an exception..

http://stackoverflow.com/questions/6343166/android-os-networkonmainthreadexception

In general if you're doing any socket communication over a UI thread,
you've made a mistake.  The right way to handle this is with a
background thread (or perhaps AsyncTask, or even using a Service) and
set up a Messenger / Handler between them.

kris

On Fri, Jan 20, 2012 at 8:55 AM, Chihwah <chihwa...@gmail.com> wrote:
>
> Hello,
>
> In a few cases  you will need to create a seperate thread. You could get an
> message that your app is not responding. If that's the case, create a new
> thread, Inside this new thread you execute your code.
>
> Might be handy to send some code, so that people can have a look. Hope this
> helps you.
>
> Cwli
>
> Op 20-1-2012 10:27, aru padam schreef:
>
>> Hi all,
>>
>>   I am using internet connection in android application.Suppose net
>> connection is slow ,then the app is force closed .
>>
>> How can i rectify this problem .....Please help me .urgent.......
>>
>> Thanks in Advance
>>
>> Deepesh C
>>
>
> --
> 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+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Reply via email to