pushNotificationReceived | |||||||
Type | message | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Associations | stack | ||||||
Summary | Sent when the application receives a push notification from a Push Notification Server. | ||||||
Introduced | 5.5 | ||||||
OS | ios, android | ||||||
Platforms | mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Command: iphoneSetNotificationBadgeValue Function: iphoneGetNotificationBadgeValue, mobileGetDeviceToken Message: pushNotificationRegistered, pushNotificationRegistrationError | ||||||
Description | Handles the pushNotificationReceived message to perform an action when the device receives a push notification message from a server for the application. The pushNotificationReceived message is handled once the application receives a push notification from a Push Notification Server. Depending on the status of the application, iOS can launch a dialog box or open the login screen to inform the user that an application has information for them. Android can create an application icon in the status bar. The user can then decide whether or not to open the application. If the application is opened as a result of the notification, then LiveCode can handle the message. If an application is currently running when it receives a notification, then LiveCode can handle the message and process it as required. If a badge number is received with the notification, then that badge value is displayed on the applications icon (iOS only), but only if the application is not currently running. If the application is running, then a badge value update does not take place, as the application can handle the message without being launched. |