sank20 / acra

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

Enhancement: Showing the Crash Report Dialog immediately after a crash #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Is it possible to show the Crash Report Dialog immediately after a crash,
essentially replacing the traditional Android Force Close dialog. The
reason for this is for better user experience. 

The existing method of using notification to display the dialog is fine, if
the user acts on it immediately. But since it is shown in the notification
area, the user may choose to ignore it or act on it later. If the user
encounters another Force Close, there won't be another notification shown
to him, and since there is no more Force Close dialog, he may be left
wondering why nothing is happening.

I've once tried to display my own crash dialog unsuccessfully. I forgot the
reason why it didn't work. Perhaps this is an Android OS limitation?

Original issue reported on code.google.com by azgol...@gmail.com on 29 May 2010 at 6:49

GoogleCodeExporter commented 8 years ago
I have been unsuccessful in showing any dialog immediately after the crash. I 
have 
studied the OS source code and I think the application state won't allow us 
this. The 
standard FC dialog is started from a system component and is like a separate 
application on its own.

Just a few more details about acra and notifications :
- if the user doesn't answer to the dialog, the report is stored
- when the application starts again, acra looks for unsent reports and issues a 
new 
notification until the user accepts or refuse to send all pending reports
- if another crash occurs, the new notification/dialog will be for both the new 
and 
any pending report
- if the user refuse to send a report, all pending reports are deleted

Thank you for your feedback !

Original comment by kevin.gaudin on 6 Jun 2010 at 4:44

GoogleCodeExporter commented 8 years ago
Alexey is working on this subject so I reopen the issue. Don't expect something 
too soon, this is really complex and will need weeks before we come to a real 
solution.

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

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi Kevin, I've looked into this and found I can raise the dialog similarly to 
the way the notifier does using the code below (I call notifyDialog() instead 
of notifySendReport().  Is there any reason why this wouldn't work for solving 
this problem?

   /**
     * -------- Function added-----
     * Notify user with a dialog the app has crashed, ask permission to send it.
     * {@link CrashReportDialog} Activity.
     */
    void notifyDialog(String reportFileName)

    {
        Log.d(LOG_TAG, "Creating Dialog for " + reportFileName);
        Intent dialogIntent = new Intent(mContext, CrashReportDialog.class);
        dialogIntent.putExtra(EXTRA_REPORT_FILE_NAME, reportFileName);
        dialogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    mContext.startActivity(dialogIntent);
    }

Original comment by the4seg...@gmail.com on 1 Nov 2011 at 2:32

GoogleCodeExporter commented 8 years ago
Hi Julia,

On which android versions did you test this ?

I will run new tests on my side.

Kevin

Original comment by kevin.gaudin on 4 Nov 2011 at 9:01

GoogleCodeExporter commented 8 years ago
I'm surprised, it works on both Cupcake and Ice Cream Sandwich. There's a 
difference though between Ice Cream Sandwich and Cupcake: the crashed activity 
stays on screen with Cupcake and disapears with ICS.

Anyway, it looks like the ACTIVITY_NEW_TASKS allows to create a new task stack 
for the app that is immediately relaunched after the application has been 
killed by ACRA and then restarted by the system.

There are many further tests to perform but this is really promising, it looks 
like we will get rid of the notification after all!

Thanks a LOT.

Original comment by kevin.gaudin on 4 Nov 2011 at 10:40

GoogleCodeExporter commented 8 years ago
Hi Kevin, I tested on Gingerbread and Honeycomb.

Original comment by the4seg...@gmail.com on 7 Nov 2011 at 1:12

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 26 Nov 2011 at 8:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I know this hasn't been tested enough to be verified as rock-solid yet, but 
would you guys consider it stable enough for integration into an existing app?

Original comment by epek.w...@gmail.com on 4 Dec 2011 at 9:50

GoogleCodeExporter commented 8 years ago

Original comment by kevin.gaudin on 7 Sep 2012 at 9:31