public override bool FinishedLaunching(UIApplication app, NSDictionary launchOptions) { bool handled = true; // Get possible shortcut item if (launchOptions != null && UIApplication.LaunchOptionsShortcutItemKey != null) { LaunchedShortcutItem = launchOptions [UIApplication.LaunchOptionsShortcutItemKey] as UIApplicationShortcutItem; handled = (LaunchedShortcutItem == null); } #if TESTCLOUD Xamarin.Calabash.Start(); #endif var screenBounds = UIScreen.MainScreen.Bounds; Images.MaxScreenSize = (float)NMath.Max(screenBounds.Width, screenBounds.Height); SetUpApp(app); app.BeginReceivingRemoteControlEvents(); // create a new window instance based on the screen size window = new UIWindow(screenBounds); window.TintColor = Style.DefaultStyle.AccentGradientColor; Style.IsDeviceDark = window.TintColor != Style.DefaultStyle.AccentGradientColor; window.TintColor = Style.DefaultStyle.AccentColor; // If you have defined a view, add it here: // window.RootViewController = navigationController; // make the window visible window.MakeKeyAndVisible(); window.RootViewController = new RootViewController(); CheckLogin(); try { Application.AppStart?.Stop(); } catch (Exception ex) { Console.WriteLine(ex); } //TODO: uncomment this to work on the Secondary Screen/Car interface. //TestCarInterface (); return(handled); }
public override bool FinishedLaunching(UIApplication app, NSDictionary launchOptions) { bool handled = true; SimpleAuth.Providers.Twitter.Init(); AppCenter.Start(ApiConstants.MobileCenterApiKey, #if ADHOC typeof(Microsoft.AppCenter.Distribute.Distribute), #endif typeof(Analytics), typeof(Crashes)); // Get possible shortcut item if (launchOptions != null && UIApplication.LaunchOptionsShortcutItemKey != null) { LaunchedShortcutItem = launchOptions[UIApplication.LaunchOptionsShortcutItemKey] as UIApplicationShortcutItem; handled = (LaunchedShortcutItem == null); } #if TESTCLOUD Xamarin.Calabash.Start(); #endif var screenBounds = UIScreen.MainScreen.Bounds; Images.MaxScreenSize = (float)NMath.Max(screenBounds.Width, screenBounds.Height); SetUpApp(app); app.BeginReceivingRemoteControlEvents(); // create a new window instance based on the screen size window = new UIWindow(screenBounds); window.TintColor = Style.DefaultStyle.AccentColor; // If you have defined a view, add it here: // window.RootViewController = navigationController; // make the window visible window.MakeKeyAndVisible(); window.RootViewController = new RootViewController(); CheckLogin(); //TODO: uncomment this to work on the Secondary Screen/Car interface. //TestCarInterface (); return(handled); }