了解其他应用在 Android 上崩溃的频率
我的经理询问应用程序是否可以了解 Android 设备上安装的其他应用程序崩溃了多少次。
根据我对应用程序沙箱的理解,这应该是不可能的。也许 Android 操作系统会在日志中写入哪些应用程序崩溃、崩溃的时间、原因(例如保存的堆栈跟踪)?如果是,人们可以解析它们(如果权限允许,甚至可以在未root的手机上解析)。
这应该适用于任何类型的其他应用程序,无论是否来自 AndroidMarket,而不仅仅是我们自己开发的应用程序。
谢谢!
My manager asks if it's possible for an app to learn how many times OTHER apps that are installed on the Android device have crashed.
From what I understand about sandboxing the apps, this shouldn't be possible. Is maybe the Android OS writing somewhere into logs which apps crashed, when, for what reason (e.g. stack trace saved)? If yes, one could parse them (possibly even on a non-rooted phone, if permissions allow).
This should work for just any kinds of other apps, from AndroidMarket or not, and not only those we developed ourselves.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
某些应用允许将未处理异常的堆栈跟踪写入 LogCat,如果您拥有 READ_LOGS 权限,则可以读取该日志。理想情况下,很少生产应用程序会这样做,因为人们可能会认为这是一个安全问题。那些拥有自己的报告未处理异常的机制(例如 ACRA)不一定会将其数据记录到 LogCat,并且您无法确定它们是否“崩溃”。
Some apps will allow their stack traces for unhandled exceptions to be written to LogCat, which you can read if you have the
READ_LOGS
permission. Ideally, few production applications do this, as one can argue that it's a bit of a security issue. Those that have their own mechanism for reporting unhandled exceptions (e.g., ACRA) will not necessarily log their data to LogCat, and you have no way about finding out whether or not they "crashed".