记录Android应用程序从前台移动到后台的原因

时间:2013-11-01 22:31:17

标签: java android error-handling

我有一个在自助服务终端上运行的应用。大约8个小时后,应用程序“消失”。通过“消失”我的意思是它不再是最顶级的应用程序和桌面显示。该应用程序仍在运行,因为它在我单击“切换应用程序”按钮后出现。

我想弄清楚为什么会这样。我添加了

protected void onDestroy() {
    Log.e("here", "onDestroy");
    super.onDestroy();
}

protected void onPause() {
    Log.e("here", "onPause");
    super.onPause();
}


protected void onStop() {
    Log.e("here", "onStop");
    super.onStop();
}

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.e("here", "onCreate");

    super.onCreate(savedInstanceState);
    webView = (WebView) findViewById(R.id.webView);

    Thread.setDefaultUncaughtExceptionHandler(
                new Thread.UncaughtExceptionHandler() {
                    public void uncaughtException(Thread thread, Throwable ex) {
                    };
                }
        );

当我接受错误报告时,我正在这样思考,我会看到发生了什么。但是,没有任何东西在日志中进行学习。

10-31 18:44:03.400   354   397 W InputDispatcher: channel '41327498 com.here/com.here.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
10-31 18:44:03.400   354   397 E InputDispatcher: channel '41327498 com.here/com.here.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
10-31 18:44:03.400   354   607 I WindowState: WIN DEATH: Window{41327498 u0 com.here/com.here.MainActivity}
10-31 18:44:03.420   354   607 W InputDispatcher: Attempted to unregister already unregistered input channel '41327498 com.here/com.here.MainActivity (server)'
10-31 18:44:03.430   354   366 W ActivityManager: Force removing ActivityRecord{411eea18 u0 com.here/.MainActivity}: app died, no saved state
10-31 18:44:03.490   354   413 I qtaguid : Failed write_ctrl(s 0 10054) res=-1 errno=1
10-31 18:44:03.490   354   413 W NetworkManagementSocketTagger: setKernelCountSet(10054, 0) failed with errno -1
10-31 18:44:03.600   354   366 I ActivityManager: Start proc com.android.launcher for activity com.android.launcher/com.android.launcher2.Launcher: pid=7147 uid=10024 gids={50024, 1028}

有没有人知道为什么在使用几个小时后窗口被隐藏了?有什么东西我可以用它来检测系统吗​​?

0 个答案:

没有答案