schedule


Purpose

Schedules a notification.

Note

Once a notification is scheduled, it stays registered in the system until it is canceled by the cancelAll method.

Signature

schedule( notification )

Returns

This method does not return anything.

Parameters

The table below describes parameters included in the notification object, structured as follows:

{ 
  fireDate,
  title,
  message,
  badge,
  soundName,
  repeatInterval
}
Name Description Type
fireDate A time stamp in milliseconds, specifying the time when the notification should be delivered. date
title The notification title (optional). On iOS, this parameter is ignored. string
message The notification message (optional). Passing a null or undefined value results in issuing an audio-only notification (the device plays a sound file defined in the sound parameter and the dialog box is not displayed). string
badge

A badge to be shown on the iOS app icon. Passing "0" (the default value) clears the badge.

Tip

Android does not support badges, therefore this setting will be ignored on Android devices.

integer
soundName The name of a sound file to be played. The name must include an extension (otherwise Apple's API for Local Notifications will not play the sound when Hybrid Container is in the background). For the default system alert sound, the string "default" should be passed. The default value of this parameter is null, i.e. no sound is played. All sound files found in the resources/sounds directory will be packaged into the Hybrid Container's client bundle. string
repeatInterval One of the interval constants defining alert repeat interval. Please refer to the section entitled Constants for a list of supported values. string

Constants

All constant values are prefixed with the window.launchbox.LocalNotifications prefix.

Name Description
NO_REPEAT Do not repeat the notification. This is the default value.
YEAR_INTERVAL Repeat the notification every year.
MONTH_INTERVAL Repeat the notification every month.
DAY_INTERVAL Repeat the notification every day.
HOUR_INTERVAL Repeat the notification every hour.
MINUTE_INTERVAL Repeat the notification every minute.

Related topics

LocalNotifications
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...