protected override void OnResume() { if (InternalDataService.DatabaseInitialized) { Task.Run(async() => { await SyncingService.SyncDataAsync(); }); } }
protected override void OnStart() { AppCenter.Start("android=86311dca-ab38-41be-bf0d-77b43d392cd4;", typeof(Analytics), typeof(Crashes)); DependencyContainer.Register(); MappingConfiguration.Init(); using (var scope = DependencyContainer.Container.BeginLifetimeScope()) { SyncingService = scope.Resolve <ISyncingDataService>(); InternalDataService = scope.Resolve <IInternalDataService>(); } Task.Run(async() => { await InternalDataService.Initialise(); await SyncingService.SyncDataAsync(); MainPage = new MainPage(); }); }