Reputation: 389
What happens, from app point of view, when the user holds the button on a W10 phone, and the app manager shows up having the apps in carousel?
I suspected, the app is suspended right away, but it seems I was wrong...
What about the case when the user taps the same application in the app manager after the long press of the back? Is there a way to handle that event?
LE: app suspended event is triggered in this case.
Upvotes: 0
Views: 357
Reputation: 29792
There will be fired only two Window's events in this case - VisibilityChanged and Activated. Take a simple test to see how it works:
public MainPage()
{
this.InitializeComponent();
Window.Current.Activated += (s, e) => { Debug.WriteLine($"Activated event due to {e.WindowActivationState}"); };
Window.Current.VisibilityChanged += (s, e) => { Debug.WriteLine($"Visibility event - window is {e.Visible}"); };
}
Note that this events will be also fired in many other cases, like for example a prompt message. Also they are connected to your windows, so they are app-wide. You will need to handle them correctly.
Nevertheless I'm not sure if they will be needed - consider this, if you see the 'carousel' and user has chosen your app, it hadn't stopped working, hadn't been suspended, so the user should be back to the moment when he has left the app.
Upvotes: 2