如何监视所有正在运行的应用程序的生命周期的活动和崩溃? [英] How to monitor all running apps activities lifecycles and crashes?

查看:119
本文介绍了如何监视所有正在运行的应用程序的生命周期的活动和崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一个监控服务,它会知道,当应用程序启动/恢复/启动/暂停/ ... ,还当应用程序崩溃。

I'm trying to create a monitor service which would know when apps start/resume/restart/pause/... and also when apps crashes.

我试图阅读的logcat,但似乎调用[的onCreate()/ ONSTART()/ onRestart()/ ...]未登录logcat中。

I have tried to read logcat, but it seems that calls to [onCreate()/onStart()/onRestart()/...] are not logged into logcat.

有没有一种方法来捕获所有这些方法调用的所有正在运行的应用?有没有办法知道,当一个应用程序崩溃?

Is there a way to catch all these method calls for all running apps ? Is there a way to know when an app crash ?

注:该服务并不需要,一旦这些事件发生的通知,几秒钟/后分还行

Note: The service don't need to be notified as soon as these events happens, few seconds/minutes after is also okay.

推荐答案

您可以检查出 Crashlytics 用于碰撞跟踪。你可以看到失事线的方法为好。

You can check out Crashlytics for crash tracking. You can see crashed lines in methods as well.

这篇关于如何监视所有正在运行的应用程序的生命周期的活动和崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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