LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
on mouseUp
local tCurrentTime, tNotificationTime, tAlertBody, tAlertButton, tAlertMessage, tSound
put the seconds into tCurrentTime
put field "alertbody" into tAlertBody
put field "alertbutton" into tAlertButton
put field "message" into tAlertMessage
put tCurrentTime + word 1 of field "seconds" into tNotificationTime
put the hilite of button "sound" into tSound
mobileCreateLocalNotification tAlertBody, tAlertButton, tAlertMessage, tNotificationTime, tSound
end mouseUp
That was great!
But my Question is how to make it notify at a specific day and time for example, 17/4/2013 at 4:07 PM!
And how to change the notification icon
local sAlertTime
on startCheckTime
put fld "myAppointment" into sAlertTime
convert sAlertTime to seconds
send "doCheckTime" to me in 10 milliseconds
end startCheckTime
on doCheckTime
if the seconds = sAlertTime then
-- do what you want
end if
if doCheckTime is not in the pendingmessages then
send doCheckTime to me in 60 seconds
end if
end doCheckTime
on stopPending pPending
repeat for each line aLine in the pendingmessages
if aLine contains pPending then
cancel item 1 of aLine
end if
end repeat
end stopPending
I'm confused... I suspect this is for mobile, yet it is in the 'Commercial Developers' section of the forum.. So, the question is what's it for 'mobile' or the desktop ?
on doCheckTime
if the seconds = sAlertTime then
answer "Happy birthday Brother"
end if
if doCheckTime is not in the pendingmessages then
send doCheckTime to me in 60 seconds
end if
end doCheckTime