private void QueueNextTime(DateTime thisTime) { _Timer.Interval = NextInterval(thisTime); Debug.WriteLine(_Timer.Interval); _LastTime = thisTime; EventStorage.RecordLastTime(thisTime); _Timer.Start(); }
protected override void OnCreate(Bundle bundle) { if (int.Parse(Build.VERSION.Sdk) >= 26) { _uiNotificationBroadcastReceiver = new UiNotificationBroadcastReceiver(); } this.InitializeGlobalExceptionHandlers(); this.CancelAllAppNotifications(); TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); CrossCurrentActivity.Current.Activity = this; _networkStatusTimer.Elapsed += this.CheckNetworkStatus; _networkStatusTimer.Start(); global::Xamarin.Forms.Forms.Init(this, bundle); Xamarin.Essentials.Platform.Init(this, bundle); if (this.Intent?.Extras?.GetBoolean(BroadcastingConstants.IsAfterBootCompleteExtraKey) == true) { this.LoggingService.Log(BroadcastingConstants.SucceessfulLogInfo, LogType.Info); } var serializedModel = this.Intent?.Extras?.GetString(MainActivityConstants.SerializedMessageModelExtraKey); if (string.IsNullOrEmpty(serializedModel)) { this.LoadApplication(CurrentUiApp = new App()); } else { var messageModel = JsonConvert.DeserializeObject <ApiModels.Message>(serializedModel); this.LoadApplication(CurrentUiApp = new App(messageModel)); } #if DEBUG var refreshedToken = FirebaseInstanceId.Instance.Token; global::System.Diagnostics.Debug.WriteLine($"Refreshed token: {refreshedToken}"); #endif }
public void Start() => _timer.Start();