Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
On UWP (tested on both phone and desktop), the OnSleep and OnResume methods described in the XF documentation at the following URL, are not executed:
Another dev has reported the same thing on the forums at:
Ideally, those methods should get called. But, if they are not going to be called, the documentation should be updated to match the actual behavior.
For info, there is some useful information about lifecycle on Windows 10 at the following address:
As per the thread mentioned above, there only seems to be one scenario when OnSleep is called on UWP, described by the author of the forum post as follows:
"The only time the onsleep fires is when i hold the back button and terminate the app using the X"
From that MSDN page:
"A note about debugging using Visual Studio: Visual Studio prevents Windows from suspending an app that is attached to the debugger. This is to allow the user to view the Visual Studio debug UI while the app is running. When you're debugging an app, you can send it a suspend event using Visual Studio. Make sure the Debug Location toolbar is being shown, then click the Suspend icon."
The events fire internally on one of our control gallery projects when using the aforementioned toolbar, so I'd be led to believe that this is the cause. I presume OnSleep firing due to app termination would be due to the debugger no longer running.
@Paul DiPietro - Yes, you are correct. Please excuse my brain fade :-)
Setting to Resolved/Invalid