frydsh 发表于 2013-1-3 17:01:37

Android ANR

Android ANR

<div class="postText"><div id="cnblogs_post_body">What Triggers ANR?

In Android, application responsiveness is monitored by the Activity Manager and Window Manager system services. Android will display the ANR dialog for a particular application when it detects one of the following conditions:

[*]No response to an input event (e.g. key press, screen touch) within 5 seconds
[*]A BroadcastReceiver hasn't finished executing within 10 seconds
How To Avoid ANR?

Thread
How To Detect ANR?

You can use StrictMode to help find potentially long running operations such as network or database operations that you might accidentally be doing your main thread.
页: [1]
查看完整版本: Android ANR