https://github.com/GisKook/testservice

2016-03-20 20:17 GMT+08:00 Kai Zhang <[email protected]>:

> Hello,
>      I start a service from broadcast receiver.Then use thread.sleep in
> service's onStartCommand function.Then the ANR shows.the code is here(
> https://github.com/GisKook/testservice).So the service is in UI thread
> too?
> Thanks,
> zhangkai
>
> 2016-03-20 16:13 GMT+08:00 gjs <[email protected]>:
>
>> Hi,
>>
>> ANR usually means you are doing too much work on a UI thread, long
>> running tasks should be run on other non UI threads.
>>
>> Regards
>>
>> On Saturday, March 19, 2016 at 5:43:30 PM UTC+11, Kai Zhang wrote:
>>>
>>> Hello,
>>> I start a service(main service) from broadcast receiver(No 1).I know
>>> that If I do things more than 10s android will pop a ANR window.In case of
>>> this happen.I only request gps location for 6s.But only 6s I can not get
>>> gps location.So I register 3 broadcast receiver.The others(broadcast
>>> receiver No 2 and No 3) only request for gps location.The service's will
>>> return the location value to another broadcast receiver(result collect
>>> broadcast receiver No 4). In the No 4 receiver.If I do not do anything, The
>>> app works correctly.But If I request for a network service It will pop ANR
>>> sometimes.How can I debug the ANR situation?
>>> Thanks,
>>> zhangkai
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Android Developers" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/android-developers/1UT00xeVFqA/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/android-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/android-developers/96fd07c6-413b-41e2-8c82-8658ad7042a5%40googlegroups.com
>> <https://groups.google.com/d/msgid/android-developers/96fd07c6-413b-41e2-8c82-8658ad7042a5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CACeJ9PMp1dYPVEZGhyxJOgYmP-42Jb43GbeMzROYcXXL0_mBtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to