public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args) { // TODO: add your long-running task here SQLiteClient.Init(); await ImageCache.Instance.InitializeAsync(ApplicationData.Current.LocalCacheFolder, "ImageCache"); ImageCache.Instance.MaxMemoryCacheCount = Int32.MaxValue; #if DEBUG var taskConfig = new InstantUploadRegistration(); await taskConfig.EnableAsync(); #endif if (startKind == StartKind.Launch) { if (Configuration.IsFirstRun) { Configuration.RemoveCredentials(); Configuration.IsBackgroundTaskEnabled = false; NavigationService.Navigate(typeof(WelcomePage)); } else { NavigationService.Navigate(typeof(FilesPage)); } } }
public CameraUploadPageViewModel() { _targetFolder = new DavItem { EntityId = Configuration.CameraUploadTargetFolder }; _registration = new InstantUploadRegistration(); SelectFolderCommand = new DelegateCommand(() => NavigationService.NavigateAsync(typeof(SelectFolderPage), new DavItem { EntityId = Configuration.ServerUrl }, new SuppressNavigationTransitionInfo())); }
public void Run(IBackgroundTaskInstance taskInstance) { if (Configuration.IsBackgroundTaskEnabled) { var reg = new BackgroundTaskConfiguration(); reg.Enabled = true; } if (Configuration.IsCameraUploadEnabled) { var reg = new InstantUploadRegistration(); reg.Enabled = true; } SQLiteClient.Init(); }