Skip to content
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

forceCloseDialogAfterToast not working on auto accept reports #421

Closed
Scrounger opened this issue Mar 30, 2016 · 14 comments
Closed

forceCloseDialogAfterToast not working on auto accept reports #421

Scrounger opened this issue Mar 30, 2016 · 14 comments

Comments

@Scrounger
Copy link

Hi,

i use a custom reportDialogClass and give the user the option on prferences to Enable/disable auto accept reports.
If the auto accept reports is enabled, the forceCloseDialogAfterToast is not shown. So if the app crash there is no information for the user that a crash happend - the app only closing and not restarting.

Scrounger

@F43nd1r
Copy link
Member

F43nd1r commented Mar 30, 2016

If autoaccept is true acra switches to toast mode, that means resDialogToast is shown

@Scrounger
Copy link
Author

Yes this works as described.
The wiki is described that in Toast mode its possible to show the "standard android app crash dialog" by setting forceCloseDialogAfter = false.

If i use ReportingInteractionMode.TOAST the dialog is shown.

But the dialog is not shown if the user set preferences to auto accept reports enabled by using ReportingInteractionMode.DIALOG with custom reportDialogClass and also the app dont restart.

@william-ferguson-au
Copy link
Member

@Scrounger I think you are confused about ACRA's notification methods.

  • ReportingInteractionMode.TOAST
    This will display a Toast to the user when a crash occurs. If you have also set forceCloseDialogAfter == true then it will ALSO hand to crash on to the Android frameowkr which will dis;play it's crash dialog.
  • ReportingInteractionMode.Dialog
    This shows the ACRA (or your custom dialog) when a crash occurs.
    You will never get the Android framework crash dialog shown.

Does this match your understanding?

You seem to be saying that if you have ReportingInteractionMode.Dialog and forceCloseDialogAfter = true and autoAcceptReports == true that the Android framework dialog is not shown and the app does not restart.

As I showed above, you would never expect to see the Android framework crash dialog when you have configured ReportingInteractionMode.Dialog.

The fact that the app does not restart is interesting and is probably caused by the use of ReportingInteractionMode.Dialog and that the ACRA dialog is finishing cleanly. Perhaps if it killed the VM with an error code, eg System.exit(-1), but that seems drastic.

@F43nd1r
Copy link
Member

F43nd1r commented Mar 31, 2016

The fact that the app does not restart is interesting and is probably caused by the use of ReportingInteractionMode.Dialog and that the ACRA dialog is finishing cleanly. Perhaps if it killed the VM with an error code, eg System.exit(-1), but that seems drastic.

Maybe we can add a configuration option for an intent Uri, which is called after acra is done. (to provide a constistent restart)

@Scrounger
Copy link
Author

@william-ferguson-au

You seem to be saying that if you have ReportingInteractionMode.Dialog and forceCloseDialogAfter = true and autoAcceptReports == true that the Android framework dialog is not shown and the app does not restart.

As I showed above, you would never expect to see the Android framework crash dialog when you have configured ReportingInteractionMode.Dialog.

Thats exactly what i mean, the user dont get an info that the app has crashed in the this configuration.
At my opinion its a bad user interaction.
Could you please implement to show optional the Android framework crash dialog? Something like forceCloseDialogAfterDialog.

@william-ferguson-au
Copy link
Member

I don't understand. If you have configured ReportingInteractionMode.Dialog, then the user will get notified of the crash via the ACRA crash dialog.

Why do you want to them to also get notified of the crash by the Android framework dialog?

@Scrounger
Copy link
Author

@william-ferguson-au
In configuration ReportingInteractionMode.Dialog and autoAcceptReports == true the user dont get an info that the app crashed, the app just closing.
In this configuration it would better to show an info that the app crashed e.g. the Android standard crash dialog.

@F43nd1r
Copy link
Member

F43nd1r commented Apr 1, 2016

autoAcceptReports represents "I don't want to see any dialogs". Showing the default Android dialog would be contradicting. Showing a toast instead is acceptable.

@william-ferguson-au
Copy link
Member

I want to resolve #405 first, but once that is done I think we gain some clarity on this issue by

@william-ferguson-au
Copy link
Member

@F43nd1r want to have a go at cleaning it up as per my comments above?
Once we have this in I want to release 4.9.0

@F43nd1r
Copy link
Member

F43nd1r commented Apr 20, 2016

Yes. As the versions from 4.8.0 to 4.9.0 contain breaking changes anyway (especially around KeyStore) I think it would fit to drop the setters on the configuration too. Do you agree?

@william-ferguson-au
Copy link
Member

Good idea. Do that in a separate PR though.
The simpler and more tightly focused each PR is the easier it is to vet it.

@F43nd1r
Copy link
Member

F43nd1r commented Apr 20, 2016

Maybe alsoReportToNative instad of alsoReportToAndroidFramework? it is shorter and it says the same.

@william-ferguson-au
Copy link
Member

OK I'm closing this now we have a PR that rounds off the sharp edges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants