protected override void OnNavigatedTo(NavigationEventArgs e) { if (!ApplicationData.Current.LocalSettings.Values.ContainsKey(Constants.HasDoneOOBEKey)) { ApplicationData.Current.LocalSettings.Values[Constants.HasDoneOOBEKey] = Constants.HasDoneOOBEValue; } Task.Run(() => OnboardingService.Start()); base.OnNavigatedTo(e); }
public void Run(IBackgroundTaskInstance taskInstance) { _deferral = taskInstance.GetDeferral(); try { // start IoT OnBoarding _onboardingService.Start(); } catch (Exception ex) { Debug.WriteLine(ex); throw; } }