倾听并回应ANR? [英] Listen and respond to ANR?

查看:132
本文介绍了倾听并回应ANR?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法得到通知,当你的应用程序触发ANR(应用程序无响应)?类似于默认的异常处理?

Is there a way to get notified when your app triggers an ANR (Application Not Responding)? Similar to the default exception handler?

在期待的你会用它做什么的答案,只是记录。不是做任何事情。

In anticipation of the "what would you do with it" answers, just logging. Not "doing" anything.

推荐答案

没有。与你发生过程中的VM内,您可以捕获异常,ANR是由一个系统监视程序,你的虚拟机外部产生。谷歌提供的触发器和避免信息

No. Unlike exceptions that occur within your process's VM that you can catch, the ANR is generated by a system watchdog, outside your VM. Google offers info on triggers and avoidance

这篇关于倾听并回应ANR?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆