public void Activate() { LoggerService.Instance.Log("App.Activate"); Device.StartTimer(pollInterval, PollTimerCallBack); MarkManager.StartMarkTimer(); viewModel?.SetIsInBackground(false); var postLoad = (MainPage as NavigationPage)?.CurrentPage as PostLoad; if ((postLoad != null) && !postLoad.InitiateSignInSequencePerformed) { var task = postLoad.InitiateSignInSequence(); } }
protected override async void OnResume() { LoggerService.Instance.Log("App: OnResume"); sleeping = false; if (viewModel != null) { viewModel.SetIsInBackground(false); if (!pollQueue.Running) { await pollQueue.EnqueueAsync(async() => await viewModel.Poll(true)); } else { await pollQueue.WaitAllTasks(); } } FacebookToolsService.Instance.ActivateApp(); base.OnResume(); }