您的位置:首页 > 移动开发

android 监听其它app的错误或者崩溃的方法 (ProcessErrorStateInfo)

2015-08-14 16:09 567 查看
具体请参见android源码:ProcessErrorsTest.java

private String checkForProcessErrors() throws Exception {

List<ProcessErrorStateInfo> errList;

errList = mActivityManager.getProcessesInErrorState();

// note: this contains information about each process that is currently in an error

// condition. if the list is empty (null) then "we're good".

// if the list is non-empty, then it's useful to report the contents of the list

final String reportMsg = reportListContents(errList);

return reportMsg;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: