I want to properly dispose the MediaCapture
object when the user presses on the phone's Start or Back button. I presently handle the Back pressed event through the HardwareButtons.BackPressed
event handler and dispose the MediaCapture
object. When I re-enter the app however, the Resuming event is never called and I cannot recreate the MediaCapture
object. I tried subscribing to Application.Current.Resuming
for this but it is not called. I know my handler is functioning as when I play with the Lifecycle events in debug, the appropriate handlers are called. I also tried handling the OnNavigatedTo
and OnNavigationLoadState
but these do not get called either when the app is "resumed" from holding the Back button from the start menu and then tapping on my app.
I also need to know which event is called when a user presses the Start button from within the app. Both the OnSuspending
and OnNavigationSaveState
are not called during this event. Is there something similar to HardwareButtons.BackPressed
for the Start button?