// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { #if !DEBUG AnalyticClient.Initialize("0184f217-d24d-4bef-9149-fdc62041de51"); #endif RootFrame.Navigating += RootFrameOnNavigating; }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { BugSenseHandler.Instance.InitAndStartSession(new ExceptionManager(Current), RootFrame, @"2d8ae0f1"); Api.StartSession(@"JZSMBMX659NW78S35ZPR"); AnalyticClient.Initialize(@"87c139ca-14a7-41ff-8b3b-095894a52bdf"); AnalyticClient.RegisterRootNavigationFrame(RootFrame); CheckLicense(); // Call this on launch to initialise the feedback helper FeedbackHelper.Default.Launching(); SettingManager.instance.SetIntValue(@"LaunchCount", SettingManager.instance.GetIntValue(@"LaunchCount", 0) + 1); // When a new instance of the app is launched, clear all deactivation settings RemoveCurrentDeactivationSettings(); }
// Code to execute when the application is activated (brought to foreground) // This code will not execute when the application is first launched private void Application_Activated(object sender, ActivatedEventArgs e) { Api.StartSession(@"JZSMBMX659NW78S35ZPR"); AnalyticClient.Initialize(@"87c139ca-14a7-41ff-8b3b-095894a52bdf"); //AnalyticClient.RegisterRootNavigationFrame( RootFrame ); CheckLicense(); // If some interval has passed since the app was deactivated (30 seconds in this example), // then remember to clear the back stack of pages mustClearPagestack = CheckDeactivationTimeStamp(); // If IsApplicationInstancePreserved is not true, then set the session type to the value // saved in isolated storage. This will make sure the session type is correct for an // app that is being resumed after being tombstoned. if (!e.IsApplicationInstancePreserved) { RestoreSessionType(); } }