define variable cMessage as character no-undo.
define variable iBadgeCount as integer no-undo. define variable tSendAt as datetime-tz no-undo. assign cMessage = 'App users should know this fact'. /* send immediately */ oPushService:SendNotification(cMessage, iBadgeCount). /* send in an hour's time */ assign cMessage = 'App users should know this fact, but not right now' tSendAt = add-interval(now, 1, 'hours'). oPushService:ScheduleNotification( cMessage, iBadgeCount, tSendAt, true). /* use device time zone? */ catch eNSE as NotificationServiceError: message string(eNSE:GetErrorMessage()) view-as alert-box title 'NotificationServiceError'. end catch. |