开发者

Android Crash Reports using ACRA in service

开发者 https://www.devze.com 2023-02-28 00:58 出处:网络
I want to use ACRA in my app for crash reporting. I have used it earlier in other app. My app doesn\'t have nay activi开发者_如何学Goty and is just a service. I want to have crash reports for service.

I want to use ACRA in my app for crash reporting. I have used it earlier in other app.

My app doesn't have nay activi开发者_如何学Goty and is just a service. I want to have crash reports for service.

How can I use ACRA for this?

Its init function expects a reference of application class as argument. I tried using application class in my app but it is not working. Also if I create application class, it shows my app' icon on phone, which I don't want.


Having an application class should be possible even if you don't have any Activity. When a service is started the Application class is created beforehand.

Check that you declared correctly your application in the manifest <application name=".MyApplication">.

The icon in the launcher should not appear if you don't have an Activity declared with LAUNCHER and MAIN intent filters.


Actually you can use TestPoke a crash report platform, the integration is just only one line of code, you can leverage of it, sending logs and handled exception, so you will have a more granular control of which you want to see in your online reports.

http://www.testpoke.com

0

精彩评论

暂无评论...
验证码 换一张
取 消