Example #1
0
 private async void ReadSession_Revoked(object sender, ExtendedExecutionForegroundRevokedEventArgs args)
 {
     await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(
         CoreDispatcherPriority.High, () => {
         Home.GetCurrent().AddLog($"Extended execution session revoked. Closing server.", Models.AppLog.LogCategory.Debug);
     });
 }
 private void SessionRevoked(object sender, ExtendedExecutionForegroundRevokedEventArgs args)
 {
     if (_session != null)
     {
         _session.Dispose();
         _session = null;
     }
 }
        private async void SessionRevoked(object sender, ExtendedExecutionForegroundRevokedEventArgs args)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                switch (args.Reason)
                {
                case ExtendedExecutionForegroundRevokedReason.Resumed:
                    Debug.WriteLine("Extended execution revoked due to returning to foreground.");
                    break;

                case ExtendedExecutionForegroundRevokedReason.SystemPolicy:
                    Debug.WriteLine("Extended execution revoked due to system policy.");
                    break;
                }

                // EndExtendedExecution();
            });
        }
Example #4
0
 private void OnSessionRevoked(object sender, ExtendedExecutionForegroundRevokedEventArgs args)
 {
     _slider.Shutdown();
     Application.Current.Exit();
 }
Example #5
0
 private void Session_Revoked(object sender, ExtendedExecutionForegroundRevokedEventArgs args)
 {
     ClearExtendedExecution();
     Utils.Toasts.ShowToast("StartAudioInTheBackground", "Session_Revoked. Reason: " + args.Reason.ToString());
 }
Example #6
0
 private void SessionRevoked(object sender, ExtendedExecutionForegroundRevokedEventArgs args)
 {
     ShowToast("Extended execution session revoked: " + args.Reason.ToString());
 }
 private void SessionRevoked(object sender, ExtendedExecutionForegroundRevokedEventArgs args)
 {
 }