Add button to restart app on backend crash #818
gmaclennan
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current behaviour
Currently if the Mapeo Core backend crashes or becomes unresponsive, we show a generic error screen asking the user to restart the app. It is not obvious to an inexperienced user how to do this, and it varies between Android versions (e.g. open the Android app switch, and swipe to close the Mapeo app).
Desired behaviour
Show a button on the error screen that will programmatically restart Mapeo to attempt to recover from the error. If the error persists through a restart, then show a different error screen with suggested resolution (e.g. update Mapeo app?)
Implementation ideas
There does not appear to be an existing library to do this (
react-native-restart
only reloads the JavaScript bundle), but it should be possible to write a simple wrapper around some Java code: https://stackoverflow.com/questions/37489946/programmatically-restart-a-react-native-appIt is also worth investigating the possibility of reloading / restarting the background Node process programmatically. This is not currently supported by
nodejs-mobile-react-native
but it should be possible to add our own Java code to start and stop the thread running Node.Beta Was this translation helpful? Give feedback.
All reactions