add sound to local notificaction

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
cheolindo
Posts: 3
Joined: Tue Dec 01, 2015 3:06 pm

add sound to local notificaction

Post by cheolindo » Wed Dec 02, 2015 10:57 pm

Hi. I finish the clock app and have a problem.

How can I use the alarm to notify the the user is the app is not runing?

Can I use the localNotification?
if true.
How can I add sound to the alarm?

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: add sound to local notificaction

Post by Dixie » Sat Dec 05, 2015 2:41 pm

from the iOS release notes...

Local notifications allow applications to schedule notifications with the operating system. The notification can be received when the application is running in the foreground, the application is running in the background or the application is not running at all. The notification is delivered differently, depending on the mode in which the application is in at the time the notification is received.

mobileCreateLocalNotification alertBody, alertButtonMessage, alertPayload, alertTime, playSound, [badgeValue]

Use the command mobileCreateLocalNotification to schedule a notification with the OS.
• alertBody- the text that is to be displayed on the notification dialog, that is raised when the application is not running
• alertButtonMessage - the button text on the notification dialog, that is to appear on the button that launches the application, when the application is not running
• alertPayload - a text payload that can be sent with the notification request. This payload is presented to the user via the localNotificationReceived message
• alertTime - the time at which the alert is to be sent to the application
• playSound - boolean to indicate if a sound is to be played when the alert is received
• badgeValue - the number value to which the badge of the application logo is to be set. 0 hides the badge. Greater than 0 displays the value on the badge.

Post Reply

Return to “Clock”