haroldadmin / WhatTheStack

See a pretty error screen when your Android app crashes
Apache License 2.0
245 stars 22 forks source link

Add ability to restart the app from the error screen #14

Closed haroldadmin closed 4 years ago

haroldadmin commented 4 years ago

The crash screen should provide the user with the ability to restart the app.

Tasks:

I am not sure how this would affect the task-stack. Might need to fiddle with launch options to fix unexpected behaviours.

shivam21 commented 4 years ago

hi @haroldadmin I would like to work on this issue.Can I Raise the PR?

haroldadmin commented 4 years ago

Thank you for expressing your interest in the issue. Before you start working on it, it would be great to know your plan for fixing it.

shivam21 commented 4 years ago

So the idea is to have a button below Share Stack trace. Add a click listener on the button. create launch intent to launch application again using packagemanager. Clear the entire history stack and start the launcher activity using intent.

haroldadmin commented 4 years ago

Sounds good! I still have a small question though. Launching an application from the package manager requires you to know its package name. How do you plan on determining it?

shivam21 commented 4 years ago

context.packageName will return application package name.

haroldadmin commented 4 years ago

Thanks for info.

Assigning the issue to you now :)

shivam21 commented 4 years ago

Does the ui looks good to you or please suggest from where should i get icon. WhatsApp Image 2020-10-03 at 11 15 39 AM

haroldadmin commented 4 years ago

Good work! I think this icon conveys the "restart" intention better: https://material.io/resources/icons/?search=refresh&icon=refresh&style=outline

shivam21 commented 4 years ago

Thank you so much @haroldadmin. Raised the PR please check.