Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
アクティビティでグローバルな try-catch の解決策を見つけました。(ここ) サービスで同様のことを行うことはできますか?
Thread.setDefaultUncaughtExceptionHandler()あなたのアプリケーション全体のためのものです。からではなく、必要に応じてThread.setDefaultUncaughtExceptionHandler()から呼び出すことができます。ただし、ほとんどの場合、アプリケーションに対して 1 回だけ呼び出す必要があります。ServiceActivity
Thread.setDefaultUncaughtExceptionHandler()
Service
Activity