protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); instance = this; CurrentPlatform.Init(); todoItemManager = new ToDoItemManager(); App.SetTodoItemManager(todoItemManager); LoadApplication(new App()); try { // Check to ensure everything's setup right GcmClient.CheckDevice(this); GcmClient.CheckManifest(this); // Register for push notifications System.Diagnostics.Debug.WriteLine("Registering..."); GcmClient.Register(this, PushHandlerBroadcastReceiver.SENDER_IDS); } catch (Java.Net.MalformedURLException) { CreateAndShowDialog(new Exception("There was an error creating the Mobile Service. Verify the URL"), "Error"); } catch (Exception e) { CreateAndShowDialog(e, "Error"); } }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); instance = this; CurrentPlatform.Init(); todoItemManager = new ToDoItemManager(); App.SetTodoItemManager(todoItemManager); LoadApplication(new App()); return base.FinishedLaunching(app, options); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); instance = this; CurrentPlatform.Init(); todoItemManager = new ToDoItemManager(); App.SetTodoItemManager(todoItemManager); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
public MainPage() { InitializeComponent(); SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape; global::Xamarin.Forms.Forms.Init(); instance = this; todoItemManager = new ToDoItemManager(); ToDoAzure.App.SetTodoItemManager(todoItemManager); LoadApplication(new ToDoAzure.App()); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); global::Xamarin.Forms.Forms.Init(this, bundle); instance = this; CurrentPlatform.Init(); todoItemManager = new ToDoItemManager(); App.SetTodoItemManager(todoItemManager); LoadApplication(new App()); }
/// <summary> /// Constructor for the Application object. /// </summary> public App() { // Global handler for uncaught exceptions. UnhandledException += Application_UnhandledException; // Standard XAML initialization InitializeComponent(); // Phone-specific initialization InitializePhoneApplication(); // Language display initialization InitializeLanguage(); todoItemManager = new ToDoItemManager(); ToDoAzure.App.SetTodoItemManager(todoItemManager); // Show graphics profiling information while debugging. if (Debugger.IsAttached) { // Display the current frame rate counters. Application.Current.Host.Settings.EnableFrameRateCounter = true; // Show the areas of the app that are being redrawn in each frame. //Application.Current.Host.Settings.EnableRedrawRegions = true; // Enable non-production analysis visualization mode, // which shows areas of a page that are handed off to GPU with a colored overlay. //Application.Current.Host.Settings.EnableCacheVisualization = true; // Prevent the screen from turning off while under the debugger by disabling // the application's idle detection. // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run // and consume battery power when the user is not using the phone. PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled; } }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // registers for push for iOS8 var settings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); global::Xamarin.Forms.Forms.Init(); instance = this; CurrentPlatform.Init(); todoItemManager = new ToDoItemManager(); App.SetTodoItemManager(todoItemManager); UIApplication.SharedApplication.RegisterUserNotificationSettings(settings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); LoadApplication(new App()); return base.FinishedLaunching(app, options); }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // registers for push for iOS8 var settings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); global::Xamarin.Forms.Forms.Init(); instance = this; CurrentPlatform.Init(); todoItemManager = new ToDoItemManager(); App.SetTodoItemManager(todoItemManager); UIApplication.SharedApplication.RegisterUserNotificationSettings(settings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }