android 監聽其它app的錯誤或者崩潰的方法 (ProcessErrorStateInfo)

具體請參見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;
    }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章