nativescript-app-sync icon indicating copy to clipboard operation
nativescript-app-sync copied to clipboard

Fixes crash on restart (Android)

Open mayerlench opened this issue 3 years ago • 3 comments

When the option to restart the app on install is clicked the app closes and does not restart.

Then when you manually launch the app you get the below error

An uncaught Exception occurred on "main" thread. Unable to start activity ComponentInfo{org.finitydevs.link/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed TypeError: Cannot read property 'nativeView' of undefined

Appsync was using a timer-based method to launch the app and quit the current one When I switched to using an android Intent makeRestartActivityTask all the problems were resolved and the app restarts with its new assets beautifully

This only applies to Android

mayerlench avatar Feb 22 '22 22:02 mayerlench

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla. CLA has not been signed by users: @mayerlench. After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

cla-bot[bot] avatar Feb 22 '22 22:02 cla-bot[bot]

@cla-bot check

mayerlench avatar Feb 22 '22 23:02 mayerlench

The cla-bot has been summoned, and re-checked this pull request!

cla-bot[bot] avatar Feb 22 '22 23:02 cla-bot[bot]