Comments (4)
Same problem !
from prism.
fixed by #3148
from prism.
Hi @dansiegel while the recently introduced error of getting double back event has been fixed by #3148 the original problem of both the issue in scenario 2 of this issue and my original issue in #3095 still persist.
The problem was that the application would terminate when pressing the Android back button when standing on the root page of the navigation stack on a given tab page, instead of just putting the app into the background. This is at least my expected behavior,
The problem occur because a NavigationException.CannotPopApplicationMainPage occurs in
which I also already described in the original issue #3095 . This happens because it cannot pop the root page which makes sense. But instead of quitting the whole application it should just put it into background, which is the normal behavior for the apps I normally use. The underlying problem is probably in the call to navigationService.GoBackAsync() in this line it should not throw an exception result but rather put the app into the background.I know you are a busy man, but I hope this will get fixed at some point. For now I will stop creating new issues on the problem, as I don't want to pollute with new issues repeating myself.
from prism.
We are hitting this problem, in what I believe to be a slightly different flavour that is not covered in #3148:
We have a NavigationPage that contains a TabbedPage, with a button to navigate to another TabbedPage. When navigating back using the system back button, the app is sent to the background. When using the soft back button provided by NavigationPage, the navigation is handled as expected.
The structure is somewhat like this: navigate back from PrismNavigationPage <- SomeTabbedPage <- SomePage
to PrismNavigationPage <- SomeOtherTabbedPage <- SomeOtherPage
. When using the system back button, the initial back navigation is handled (correctly) from PrismNavigationPage.OnBackButtonPressed()
: a breakpoint in MvvmHelpers.HandleNavigationPageGoBack()
is hit and back navigation is handled there. However, the callback passed in android.OnBackPressed
(PrismAppBuilder.cs
) is also called. When this happens, window.CurrentPage
is SomePage
, window.CurrentPage.Parent
is SomeTabbedPage
and window.CurrentPage.Parent.Parent
is PrismNavigationPage
, so the code does not hit the check around line 84 and false
is returned, likely telling the OS to put the window in the background.
The behaviour that I expect is that the soft back button behaves the same as the hardware back button. The hardware back button should put the app in the background (not stop the process) when the navigation stack is empty.
from prism.
Related Issues (20)
- [BUG] Link to Prism License T&C is wrong HOT 1
- PrismNavigationPage doesn't allow you to change navbar title color HOT 3
- [BUG] App crash with the attached sample project HOT 1
- [BUG] .NET 8 MAUI App crashes on startup HOT 2
- [BUG] Putting an app in background when a modal is being displayed crashes the App HOT 2
- [BUG] crash when resolve an object after async function in maui app HOT 3
- [BUG] System.ArgumentException: Page to remove must be contained on this Navigation Page HOT 4
- Tab Navigation working in iOS but not Android[BUG] HOT 7
- [BUG] Region is not working on Maui when Rider Debugger is attached HOT 7
- [BUG]DelegateCommand.ObservesProperty method does not function correctly HOT 1
- [BUG] [Regions] LayoutViewRegionAdapter should be mapped to Maui.Controls.Layout instead of Maui.Controls.Compatibility.Layout HOT 1
- [BUG] [Regions] [FlyoutPage] View discovery on FlyoutPage
- [Enhancement] [Regions] Add 'AddOrReplace' to IRegionBehaviorFactory HOT 3
- [BUG] In some cases, my Dedug will suddenly get stuck HOT 1
- [BUG] Popup Dialogs are hidden/covered by calling Page when called after returning from MAUI FilePicker HOT 4
- [BUG] Plugin.Popups.Maui on iOS navigate to new page when showing popup Page HOT 10
- [BUG] Absolute navigation not working on iOS HOT 3
- [BUG] Wiring view models for pages in tabbed page are done by name HOT 1
- [BUG] Popup Dialog can't fullscreen and also DialogLayout.CloseOnBackgroundTapped not working. HOT 5
- Add CloseDialog to IDialogService or Extension Method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prism.