Start a service from Thread.UncaughtExceptionHandler?

前端 未结 1 575
礼貌的吻别
礼貌的吻别 2021-01-06 07:22

I\'m trying to setup a global exception handling service as mentioned in this answer. This approach sounds logical because after a crash, the code in my custom Thread.Uncaug

1条回答
  •  花落未央
    2021-01-06 07:27

    Ah, I figured this out. The key was to add android:process to the manifest, which forces the service to launch in a seperate process. This prevents the service from being killed when the application is killed.

    
        
            
        
        
    

    0 讨论(0)
提交回复
热议问题