Prevent ACRA send report in emulator

48 views
Skip to first unread message

Noon

unread,
Oct 22, 2011, 4:56:57 AM10/22/11
to acra-discuss
Hello,

I am using ACRA in my application, and would like to disable report
sending when running on emulator (since I already have the stack trace
and all the informations I need).
Is there any simple way to do this ?

Regards

Kevin Gaudin

unread,
Oct 23, 2011, 3:37:11 AM10/23/11
to acra-d...@googlegroups.com
Hi,

My own way is to add an item to disable/enable ACRA from my app's preferences:

This way, you can enable/disable ACRA from the app in your AVD and the setting is kept through updates unless you uninstall completely your app before reinstalling.

You could also simply check the value of android.os.Build.PRODUCT before the call to ACRA.init(). If the value is "sdk", don't init ACRA.

Kevin

Noon

unread,
Oct 26, 2011, 4:43:00 PM10/26/11
to acra-discuss
Hi Kevin,

Thanks for the tip : I finally chose the 2nd one and it works
perfectly.

Many thanks !
Reply all
Reply to author
Forward
0 new messages