ListLocalNotifications ( )

Parameters

None.

Description

Lists this game’s scheduled local reminders.

Returned summaries include IDs and scheduling metadata. Use the same ID to replace a reminder or CancelLocalNotification to remove it. Notifications are local; remote push and device-token registration are separate integrations. OS settings can prevent delivery.

Returns a positive request ID when accepted, or zero with GameServiceLastError for invalid input or a full queue. Poll for the result and free its event. This command runs on the main runtime and is prohibited in Worker Functions.

See the Game Services guide for configuration and complete samples.

See also: PollGameServiceEvent, GameServiceEventStatus, FreeGameServiceEvent.

Example

; ListLocalNotifications Example
; ------------------------------

Graphics 640,480,0,2
Print "Configure this service in your mobile App Setup."
Print "Run the complete sample for account setup and normal gameplay."

Local request=ListLocalNotifications()
If request=0 Then Print GameServiceLastError()
Local deadline=MilliSecs()+125000
While request>0 And MilliSecs()<deadline
    Local event=PollGameServiceEvent()
    If event
        Print "Kind: "+GameServiceEventKind(event)+" status: "+GameServiceEventStatus(event)
        Print GameServiceEventError(event)
        Local payload=GameServiceEventData(event)
        Print JsonStringify(payload)
        FreeJson payload
        If GameServiceEventRequest(event)=request Then request=0
        FreeGameServiceEvent event
    EndIf
    If KeyHit(1) Then Exit
    Delay 10
Wend
Print "Press any key to close."
WaitKey
End

Index