public void FireDateUtc() { var date = DateTime.UtcNow.AddDays(7); var notification = new UILocalNotification(); notification.FireDate = date; Assert.IsTrue(date - notification.FireDate < TimeSpan.FromSeconds(1), "Date does not match!"); }
public void NewObject() { var obj = new UILocalNotification(); Assert.AreNotEqual(IntPtr.Zero, obj.ClassHandle); Assert.AreNotEqual(IntPtr.Zero, obj.Handle); }
public void CancelLocalNotification() { RegisterUserNotificationSettings(); //This requests permission var notification = new UILocalNotification { AlertBody = "WOOT!!", ApplicationIconBadgeNumber = 1, FireDate = DateTime.Now.AddMinutes(1), }; UIApplication.SharedApplication.CancelLocalNotification(notification); }
public void PresentLocationNotificationNow() { RegisterUserNotificationSettings(); //This requests permission var notification = new UILocalNotification { AlertBody = "WOOT!!", ApplicationIconBadgeNumber = 1, }; UIApplication.SharedApplication.PresentLocationNotificationNow(notification); }
public void CancelLocalNotification(UILocalNotification notification) { ObjC.MessageSend(Handle, "cancelLocalNotification:", notification.Handle); }
public void ScheduleLocalNotification(UILocalNotification notification) { ObjC.MessageSend(Handle, "scheduleLocalNotification:", notification.Handle); }
public void PresentLocationNotificationNow(UILocalNotification notification) { ObjC.MessageSend(Handle, "presentLocalNotificationNow:", notification.Handle); }
public void ObjectSame() { var a = new UILocalNotification(); var b = Runtime.GetNSObject<UILocalNotification>(a.Handle); Assert.AreSame(a, b); }
public void NewObjectDispose() { var obj = new UILocalNotification(); obj.Dispose(); }