-
Notifications
You must be signed in to change notification settings - Fork 1.1k
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ACRA ignores sharedPreferences concerning acra #236
Comments
Post your ACRA config |
I can't reproduce this. if if 'acra.disable' is defined then it determines whether ACRA is disabled. |
Config: I currently deactivated the possibility to stop acra from collecting since I want to make it mandatory. For the other settings in the report: But the mail field is still not set: Also the syslogs are still collected and sent with the report. I honestly don't know whats up there. |
Are you entering an email address or comment in the crash report dialog? And I don't think you can make collecting crash reports mandatory if you are using mode=dialog, because the user can just cancel the dialog. If you always want to report then use mode=Silent or mode=Toast. |
In the posted report I have not entered a comment. But the commenting of reports works without any problems (Just tested it ;) ). Probably I should be more clear. To say it in the easiest way: I want to make it as near to the standard android experience as possible. Which means ACRA is collecting and when the app crashes it asks the user to send the report. What I do not want is that users can completely disable acra. (If the don't want to make the app better they should at least have to cancel the dialog everytime it crashes ;) ) |
This is not correct. The user email address is the oneentered by them into the crash report dialog. |
Then please edit your wiki. This is definitely confusing! Also if the email is entered in the dialog? Where should they enter it? I only got a field for comments but nothing else? I highly recommend to rewrite your wiki, since it seems not to be in sync with the actual state of the project. This whole chapter is completely wrong since I set my project up while reading it. https://github.com/ACRA/acra/wiki/AdvancedUsage#letting-your-users-control-acra I assume I have to change the values programmatically by creating a onPreferenceChangedListener and editing the acraConfig if the corresponding preferences are changed? |
That is what I followed this afternoon when I tested the behaviour of acra.enable/acra.disable. It clearly shows you how to add those preferences into your PreferenceScreen and let the user change them. You don't need to change them programatically. |
Here is part of my preferences.xml: Changing those settings is not changing anything in the behaviour of ACRA. I do not know why that is the case but the are completely ignored. I exchanged the checkboxPreferences with SwitchPreferences which should make no problems since the values are still the same (Boolean). |
So, do you get or not get sys logs? It determines whether it can based upon: As to the user email as I said before ti is determined based upon what the user enters into the dialog. The real question is why you don't appear to be getting the email field in your crash dialog. |
I do get sys logs. ACRA is collecting them and sending them with the report. But I cannot disable sys logs. It seems like ACRA isn't reading the defaultSharedPreferences but others. That is an interesting question. I'm referencing ACRA via gradle so I haven't changed anything in the sources. |
So, if you uncheck the preference for acra.syslog.enable and generate an exception, you get a crash report that contains sys logs? Have you tried using a CheckboxPreference instead of SwitchPreference? |
Yes that is exactly the case. I already tried using CheckboxPreference but the result is still the same. |
Possibly, but I couldn't comment about how you have generated that. I can't even see the full preferences. |
I suggest you put together a small project that demos the issue and post a link to it, so I can inspect. |
I'm currently checking if there exists another preference file for my app. I'm still unable to get it working. First problem was that ACRA somehow didn't recognize my default settings file and created it's own named "default". I rectified this by explicitely stating my own preference file. But it still ignores the settings. I'll create a project an upload it to github. |
Here is the link to the project. It's my first project on GitHub so bear with me if something is not working. You can set the values in the settings fragment. the about fragment is for triggering an exception. I'm developing on Android 5.0.x. This might be related to this problem, so keep this in mind if the error isn't occuring on your device. https://github.com/LittleHuba/ACRATest Hopefully you're able to fix this. |
Can you please cut it down to a minimum project. And make it 100% clear how you are generating the uncaught exception. Explicitly throwing a runtime exception from a button press is the best option. |
The project was tailored down to the absolute minimum. All the errors described above are still there. |
It looks like you have 3 or four sub modules. All of that makes it less than clear how I should pick up your project, On Thu, Feb 12, 2015 at 12:13 PM, LittleHuba notifications@github.com
|
I uploaded a Android Studio Project so I assume you can also pull it with android studio. It seems like you still have the old project. Please delete it and pull the new version. There should be only one module. When I'm fetching it, it gives me a dialog to delete a vcs root. Please discard this dialog. After that everything should be good to go. The project consists of one module ('app') with one activity, which has one button, which throws an exception when clicked. |
Any progress? |
No. Maybe later this week. On Tue, Feb 24, 2015 at 3:46 AM, LittleHuba notifications@github.com
|
OK 3 problems. First is that you have configured Second is that after closing the dialog, ACRA rewrites the CrashReport and takes an empty userEmail from the dialog. I will look into why that is. Third is that the test for adding system logs is improperly formed, so that on a device of API 16 or greater it will always collect logs. I will fix that. |
Thanks a lot! Trying it now. |
Everything seems to be working now. Thanks a lot. |
Excellent On Wed, Feb 25, 2015 at 4:27 AM, LittleHuba notifications@github.com
|
ACRA 4.6.0RC2 ignores acra.enable, acra.disable, acra.syslog.enable, acra.user.email in the shared preferences. It copies them into the report but the have no inflouence on the behaviour of ACRA.
-With acra.enable or acra.disable set with either values ACRA will simply disable all reports
-It will send the syslog everytime, completely ignoring acra.syslog.enable
-The mail of the user is shown in the shared preferences but is not copied into the corresponding fields of the report
The text was updated successfully, but these errors were encountered: