hirenpatel20283 / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

Preference: android:key="acra.enabled" #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I followed the "How To" for version 3 of ACRA for "Can I let the user disable 
error reporting ?"

I added the following to my preferences.xml file:

<CheckBoxPreference android:key="acra.enabled"
        android:title="@string/pref_disable_acra"
        android:summaryOn="@string/pref_acra_enabled"
        android:summaryOff="@string/pref_acra_disabled"
        android:defaultValue="true"/>

And then created strings for each of the three above.

The preference shows up and I can 'check' or 'un-check' the button and the 
preference is 'remembered' between app launches.  However, I don't know that 
ACRA is looking at this value as I always see ACRA log messages in LogCat as 
shown below regardless of the setting (on or off):

DEBUG/ACRA(862): Retrieve application default SharedPreferences.
DEBUG/ACRA(862): Set OnSharedPreferenceChangeListener.
DEBUG/ACRA(862): ACRA is enabled for com.mydomain.myapp, intializing...
DEBUG/ACRA(862): Looking for error files in /data/data/com.mydomain.myapp/files

Also, I am restarting the app from scratch (forcing a stop in 
<settings><applications><manage applications> after I back out to the home 
screen ) to make sure it is coming up 'clean'.

So, my question is: is this setting being looked at by ACRA and is it truly 
turning off error reporting when the check box is not checked?  Also, it 
occurred to me that maybe I need to read in this setting and not call 
ACRA.init() depending on it's state?  I assumed ACRA would take care of it but 
maybe that is my mistake...

Thanks

Original issue reported on code.google.com by ping...@gmail.com on 11 Dec 2010 at 4:47

GoogleCodeExporter commented 8 years ago
PS: I noticed the first way mentioned to do this has the key as:
acra.disable

and the second way has it as:
acra.enabled

On has a 'd' on the end and the other does not.  Is that a typo or is that 
correct?

Original comment by ping...@gmail.com on 11 Dec 2010 at 4:51

GoogleCodeExporter commented 8 years ago
The correct setting names are 'acra.enable' and 'acra.disable'.
Just fixed it in the wiki page, thanks a lot! And sorry for the time you lost 
on this :-(

Original comment by kevin.gaudin on 12 Dec 2010 at 12:32

GoogleCodeExporter commented 8 years ago
Thanks Kevin!   I have put ACRA in my 'Free' app called "Spin The Wheel!!!
Free".  With 235 downloads or so there have been no reports produced.  So
that is good news but oddly I would like to see at least one... or maybe I
don't.  ;-)

PS:  I never figured out a way to get ProGuard working using optimizing and
obfuscation (I only have shrinking turned on) with ACRA.  I'm new to Java so
I'm not sure I have the skills yet to 'know what's what' in figuring it
out.  If you ever use ProGuard and figure it out please drop me a line.

Thanks again!

Steve

Original comment by ping...@gmail.com on 12 Dec 2010 at 1:26