Android ANR
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 BroadcastReceiverhasn'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.
 
                     
                    
                 
                    
                 
                
            
         
         
 浙公网安备 33010602011771号
浙公网安备 33010602011771号