Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

NotificationServices.PresentLocalNotificationNow

static function PresentLocalNotificationNow(notification: LocalNotification): void;
static void PresentLocalNotificationNow(LocalNotification notification);
static def PresentLocalNotificationNow(notification as LocalNotification) as void

Description

Presents a local notification immediately.

	function Start()
	{
		var notif = new LocalNotification();
		notif.alertBody = "Hello!";
		NotificationServices.PresentLocalNotificationNow(notif);
	}

function Update() { if (NotificationServices.localNotificationCount > 0) { Debug.Log(NotificationServices.localNotifications[0].alertBody); NotificationServices.ClearLocalNotifications(); } }