-
-
Notifications
You must be signed in to change notification settings - Fork 241
[Android] Routing stuck at blank screen after last back() call #417
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
Comments
Hey @corne-de-bruin I have added an One other useful thing when debugging is subscribing to the router events. Which can help you get a better idea of what navigations are performed inside the app. I hope that help you move on with the app. |
Hey @vakrilov Thanks for helping me out, indeed i totally forgot to call unsubscribe(). I've merged you commit and that showed me the following issue: If you pull the example app again you can see this behaviour also if you follow the flow below: Now you will see that ngOnDestroy is never called and that the ngOnInit and the resumeEvent is called twice. |
I also have this issue in my app on Android. I created a workaround by calling ngOnDestroy myself upon activityDestroyedEvent: if (android) {
android.on(AndroidApplication.activityDestroyedEvent, (args: AndroidActivityEventData) => {
if (args.activity.toString().startsWith('com.tns.MyCustomActivity')) {
this.ngOnDestroy();
}
});
} |
The conclusion of this issue is the same as #923 and as of now duplicated |
I've implemented a flow in our app where we show a blocking screen under certain circumstances. When the block is removed we call the back function on RouterExtensions, before we make the call we ask if it's possible to go back. If we can't go back we route the user to the first page of the app.
If the block screen is shown when the user was on the very first screen, he will get stuck on a blank page after we removed the block screen by calling the back function, even if we perform a specific route the user still gets stuck at the blank page.
I've created a small example application to demonstrate our workflow and the issue we encounter.
https://github.com/corne-de-bruin/Nativescript-angular-routing-issue-example
The text was updated successfully, but these errors were encountered: