public async Task AddReminderAsync(ReminderModel reminder) { // TODO: Replace text with app resources LocalNotificationService.Schedule("Pumping Session Reminder", "Tap here to begin your pumping session!", reminder.Id.ToString(), reminder.Time.Value); await _connection.InsertAsync(reminder); }
// This method only requires for iOS 8 , 9 public override void ReceivedLocalNotification(UIApplication application, UILocalNotification notification) { //Change UIApplicationState to suit different situations if (UIApplication.SharedApplication.ApplicationState != UIApplicationState.Active) { LocalNotificationService.NotifyNotificationTapped(notification); } }
public override void ReceivedLocalNotification(UIApplication application, UILocalNotification notification) { base.ReceivedLocalNotification(application, notification); if (UIApplication.SharedApplication.ApplicationState != UIApplicationState.Active) { LocalNotificationService.NotifyNotificationTapped(notification); } }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); LocalNotificationService.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App()); LocalNotificationService.NotifyNotificationTapped(Intent); }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { //AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; //TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException; global::Xamarin.Forms.Forms.Init(); LoadApplication(new App()); LocalNotificationService.Init(); return(base.FinishedLaunching(app, options)); }
public void Notify(string title, string message) { if ((Xamarin.Forms.Application.Current as App).IsBackgrounded) { LocalNotificationService.ShowNotification(title, message); } else { MainActivity.Instance.ShowToast(title, message); } }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); FlexButton.Init(); LocalNotificationService.Init(); UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum); global::Xamarin.Forms.Forms.Init(); LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; //AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; //TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); Xamarin.Essentials.Platform.Init(this, savedInstanceState); LocalNotificationService.NotificationIconId = Resource.Drawable.mosque; LocalNotificationService.NotifyNotificationTapped(Intent); LoadApplication(new App()); }
public async Task RemoveReminderAsync(ReminderModel reminder) { LocalNotificationService.Cancel(reminder.Id.ToString()); await _connection.DeleteAsync(reminder); }
protected override void OnNewIntent(Intent intent) { LocalNotificationService.NotifyNotificationTapped(intent); base.OnNewIntent(intent); }