Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ANR in activity for broadcast of Intents

Tags:

android

I keep getting this error. Can anyone tell me what it means or how i fix it? Thanks

07-03 08:27:13.615: ERROR/ActivityManager(61): ANR in com.fttech.books

07-03 08:27:13.615: ERROR/ActivityManager(61): Reason: Broadcast of Intent { act=android.intent.action.TIME_TICK flg=0x40000004 (has extras) }

like image 705
tj walker Avatar asked Jul 03 '11 08:07

tj walker


People also ask

What is ANR broadcast of intent?

ANR stands for "Application not responding". This message means that your application isn't responsive to the user anymore. Normally this exception is thrown if the UI thread is blocked by an operation that takes more than 5 seconds.

What are broadcast intents?

The Android system automatically sends broadcasts when various system events occur, such as when the system switches in and out of airplane mode. The system sends these broadcasts to all apps that are subscribed to receive the event.

What is ANR and why does it happen?

Application Not Responding (ANR) errors are triggered when the UI thread of the application is not responding for more than 5 seconds. You can read more about ANRs and diagnosing ANRs in the Android documentation. Additionally, Crashlytics can help pinpoint specific problematic threads.

What is ANR monitoring?

ANR stands for Application Not Responding. An ANR will occur if you're running a process on the UI thread which takes an extended time, usually around 5 seconds.


1 Answers

ANR stands for "Application not responding". This message means that your application isn't responsive to the user anymore. Normally this exception is thrown if the UI thread is blocked by an operation that takes more than 5 seconds. Here are some information on this topic.

Android applications normally run entirely on a single (i.e. main) thread. This means that anything your application is doing in the main thread that takes a long time to complete can trigger the ANR dialog because your application is not giving itself a chance to handle the input event or Intent broadcast.

So check your code if you're doing any long-running operations on the UI thread.

like image 199
Flo Avatar answered Nov 15 '22 20:11

Flo