ios options to create time-based reminders or messages

Colin Holgate coiin at verizon.net
Sat Jul 14 10:09:15 EDT 2012


Try local notifications. This is how you set up one notification:

mobileCreateLocalNotification alertBody, alertButtonMessage, alertPayload, alertTime, playSound

alertTime is the Unix time that you want the alert to happen. See the help entry for more details on the other things.

At the time that the notification happens, the user will see a message pop up on their screen. If they touch the message it will open your app, and a message is sent to you. Here's a handler for receiving that message:

on localNotificationReceived pMsg
   answer "Local Notification:" && pMsg
end localNotificationReceived

The pMsg received is the same as the alertPayload sent in, and that can be as complex as you like.

There isn't a way to have a notification happen that automatically opens your app.

Working out the Unix time for the event is an entertaining little aspect to the problem.


More information about the use-livecode mailing list