Moai SDK  2.0
MOAINotificationsAndroid Class Reference
+ Inheritance diagram for MOAINotificationsAndroid:

Function List

getAppIconBadgeNumber
 
localNotificationInSeconds
 
registerForRemoteNotifications
 
setAppIconBadgeNumber
 
unregisterForRemoteNotifications
 

Detailed Description

ConstantsDescription
MOAINotificationsAndroid.LOCAL_NOTIFICATION_MESSAGE_RECEIVED Event code for a local notification message receipt.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_REGISTRATION_COMPLETE Event code for notification registration completion.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_MESSAGE_RECEIVED Event code for a push notification message receipt.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_RESULT_REGISTERED Error code for a successful notification registration.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_RESULT_UNREGISTERED Error code for a successful notification deregistration.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_RESULT_ERROR Error code for a failed notification registration or deregistration.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_NONE Notification type none. Unused.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_BADGE Notification type icon badges. Unused.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_SOUND Notification type sound. Unused.
MOAINotificationsAndroid.REMOTE_NOTIFICATION_ALERT Notification type alerts. Unused.

Function Documentation

getAppIconBadgeNumber

Get the current icon badge number. Always returns zero.


function getAppIconBadgeNumber ()

Returns
number count
localNotificationInSeconds

Schedules a local notification to show a number of seconds after calling.


function localNotificationInSeconds ( string message, number seconds )

Parameters
stringmessage
numberseconds
Returns
nil
registerForRemoteNotifications

Register to receive remote notifications.


function registerForRemoteNotifications ( string sender )

Parameters
stringsender The identity of the entity that will send remote notifications. See Google documentation.
Returns
nil
setAppIconBadgeNumber

Get the current icon badge number. Does nothing.


function setAppIconBadgeNumber ()

Returns
nil
unregisterForRemoteNotifications

Unregister for remote notifications.


function unregisterForRemoteNotifications ()

Returns
nil