private void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) { Debug.WriteLine("Leaving Background: " + e); Deferral deferral = e.GetDeferral(); deferral.Complete(); }
private void App_LeavingBackground(object sender, LeavingBackgroundEventArgs e) { var deferral = e.GetDeferral(); BLogger.Logger.Info("App left background and is now in foreground..."); deferral.Complete(); }
public async void Resume(object sender, LeavingBackgroundEventArgs e) { using (var deferral = e.GetDeferral()) { await ResumeCore(); } }
private void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) { Deferral deferral = e.GetDeferral(); IsForeground = true; NotificationSystem.RemoveCallToastNotifications(); deferral.Complete(); }
private void App_LeavingBackground(object sender, LeavingBackgroundEventArgs e) { var deferral = e.GetDeferral(); CoreWindowLogic.EnableDisableSmtc(); CoreWindowLogic.isBackground = false; deferral.Complete(); }
private void App_OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) { var def = e.GetDeferral(); #if LIFECYCLE_EVENTS MessageService.DisplayToastMessage(_lifecycleEventCount++ + " LEAVING BACKGROUND"); #endif def.Complete(); }
private async void Current_LeavingBackground(object sender, LeavingBackgroundEventArgs e) { if (Frame.CurrentSourcePageType == typeof(CameraPage)) { var deferral = e.GetDeferral(); await StartPreviewAsync(); deferral.Complete(); } }
protected virtual async void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) { var deferral = e.GetDeferral(); try { var suspension = Mvx.IoCProvider.GetSingleton <IMvxSuspensionManager>(); await LeaveBackground(suspension); } finally { deferral.Complete(); } }
private void App_LeavingBackground(object sender, LeavingBackgroundEventArgs e) { var deferral = e.GetDeferral(); if (!firsttime) { CoreWindowLogic.EnableDisableSmtc(); } else { firsttime = false; } CoreWindowLogic.isBackground = false; BLogger.Logger.Info("App left background and is now in foreground..."); deferral.Complete(); }
protected virtual async void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) { if (e == null) { throw new NullReferenceException(nameof(e)); } var deferral = e.GetDeferral(); try { var suspension = Mvx.IoCProvider.GetSingleton <IMvxSuspensionManager>(); await LeaveBackground(suspension).ConfigureAwait(false); } finally { deferral.Complete(); } }
private async void App_LeavingBackground(object sender, LeavingBackgroundEventArgs e) { var d = e.GetDeferral(); if (Window.Current.Content is AppShell shell && shell.AppFrame.CanGoBack) { try { await SuspensionManager.RestoreAsync(); } catch (SuspensionManagerException ex) { // Something went wrong restoring state. // Assume there is no state and continue } } d.Complete(); }
private async void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) { var deferral = e.GetDeferral(); try { if (MainPage.Current?.RealtimeClient != null) { MainPage.Current.RealtimeClient.AppIsInBackground = false; await MainPage.Current.RealtimeClient.StartFresh(); } } catch (Exception exception) { exception.PrintException("OnLeavingBackground"); } finally { deferral.Complete(); } }
private async void CoreApplication_LeavingBackground(object sender, LeavingBackgroundEventArgs e) { var Deferral = e.GetDeferral(); if (ApplicationData.Current.LocalSettings.Values["LastSelectedCameraSource"] is string LastSelectedCameraSource) { var MediaFraSourceGroup = await MediaFrameSourceGroup.FindAllAsync(); foreach (var FrameSource in from MediaFrameSourceGroup FrameSource in MediaFraSourceGroup where FrameSource.DisplayName == LastSelectedCameraSource select FrameSource) { CaptureControl.Source = Capture = await MediaCaptureProvider.SetFrameSourceAndInitializeCaptureAsync(FrameSource); break; } } else { CaptureControl.Source = Capture = await MediaCaptureProvider.SetFrameSourceAndInitializeCaptureAsync(); } ApplicationData.Current.LocalSettings.Values["ReturnCosmeticsEffectExcution"] = true; VideoEffectDefinition EffectDefinition = new VideoEffectDefinition("CosmeticsEffect.CosmeticsVideoEffect"); ApplicationData.Current.LocalSettings.Values["ReturnCosmeticsEffectExcution"] = false; VideoEffect = await Capture.AddVideoEffectAsync(EffectDefinition, MediaStreamType.VideoPreview); CaptureControl.Source = Capture; await Capture.StartPreviewAsync(); VideoEffect.SetProperties(new PropertySet() { { "LipColor", (CosmeticsControl.SelectedItem as CosmeticsItem).LipColor } }); StayAwake.RequestActive(); Deferral.Complete(); }
private void OnLeavingBackground(object sender, LeavingBackgroundEventArgs e) { Deferral deferral = e.GetDeferral(); deferral.Complete(); }