Play sound file with local notification
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Play sound file with local notification
Hi there,
As far as i can see it is not possible to play a sound file when a local notification is presented..?
Can someone confirm this please.
If this is the case, can an external be created..?
I read somewhere that its not possible with the ios public api, but Appcelerator can do this within its api, so i have to assume this can be done in some way.
I would also need the sound file to loop for as the notification will be an alarm.
As far as i can see it is not possible to play a sound file when a local notification is presented..?
Can someone confirm this please.
If this is the case, can an external be created..?
I read somewhere that its not possible with the ios public api, but Appcelerator can do this within its api, so i have to assume this can be done in some way.
I would also need the sound file to loop for as the notification will be an alarm.
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Play sound file with local notification
Hi,
What have you tried so far? By "local notification", do you mean an answer dialog? Or do you mean a local push notification? In case of local push notifications, I think it is up to the user to determine in the control panel whether to play a system sound or not. This is a privilege the programmer doesn't have. If you do mean push notifications, then you posted in the wrong place. Move this question to an iOS or Android forum.
Kind regards,
Mark
What have you tried so far? By "local notification", do you mean an answer dialog? Or do you mean a local push notification? In case of local push notifications, I think it is up to the user to determine in the control panel whether to play a system sound or not. This is a privilege the programmer doesn't have. If you do mean push notifications, then you posted in the wrong place. Move this question to an iOS or Android forum.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Play sound file with local notification
Hi there,
I basically want to schedule an alarm. And had stated building the app without looking at this portion properly, assuming i could do this with local Notifications.
It looks like i can't, as the local notification is only capable of playing a system sound (1 time) when the app is not in use
So how are all the alarm clock apps out there handling this :
The user sets an alarm time.
The app schedules the alarm ( with message, sound file etc etc).
The user closes the app.
The notification and alarm still fires and plays until interacted with.
Looking at the iOS sdk it looks like there is a UILocalNotification class with tasks that i need :
firedate
repeatinterval ------------ the important one i need to loop the sound file i think
repeatcalender
alertbody
alertaction
alertlaunchimage
alerticonbadgenumber
soundname --------------- the important one i need
reading between the lines, it looks to me that this is the class that "mobileCreateLocalNotification" is based on..?
But it is obviously not fully implemented if this is the case.
So from what you said, if i had an external that fully implemented this class, could the users prefs still be disabling the sound file attached to this notification..?
I basically want to schedule an alarm. And had stated building the app without looking at this portion properly, assuming i could do this with local Notifications.
It looks like i can't, as the local notification is only capable of playing a system sound (1 time) when the app is not in use
So how are all the alarm clock apps out there handling this :
The user sets an alarm time.
The app schedules the alarm ( with message, sound file etc etc).
The user closes the app.
The notification and alarm still fires and plays until interacted with.
Looking at the iOS sdk it looks like there is a UILocalNotification class with tasks that i need :
firedate
repeatinterval ------------ the important one i need to loop the sound file i think
repeatcalender
alertbody
alertaction
alertlaunchimage
alerticonbadgenumber
soundname --------------- the important one i need
reading between the lines, it looks to me that this is the class that "mobileCreateLocalNotification" is based on..?
But it is obviously not fully implemented if this is the case.
So from what you said, if i had an external that fully implemented this class, could the users prefs still be disabling the sound file attached to this notification..?
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Play sound file with local notification
@Mark
I have been trying to find a way to contact you regarding building externals, but there is some problems with your site.
Do you have a direct email i can get you on..?
I am : sales at doobox dot co dot uk
I have been trying to find a way to contact you regarding building externals, but there is some problems with your site.
Do you have a direct email i can get you on..?
I am : sales at doobox dot co dot uk
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Play sound file with local notification
Has this been answered?
I am using local push notifications to show banners reminding people to check my app based on a schedule they define.
My original desire was to have the user also select a sound to accompany the banner... I've seen some apps do this. Unfortunately I have had zero luck with systemBeep or anything else in geting sounds to accompany teh banner. I can get my app to play a sound once opened in response to the banner but that's backwards behavior.
Would having my app active in the background be the way to go... so it's available to play whatever sound I want (invisibly when the banner is showing?). I don't even know if it's possilbe to access the OS's built in sounds.
Jim
Will likely cross post this to the iOS board.
I am using local push notifications to show banners reminding people to check my app based on a schedule they define.
My original desire was to have the user also select a sound to accompany the banner... I've seen some apps do this. Unfortunately I have had zero luck with systemBeep or anything else in geting sounds to accompany teh banner. I can get my app to play a sound once opened in response to the banner but that's backwards behavior.
Would having my app active in the background be the way to go... so it's available to play whatever sound I want (invisibly when the banner is showing?). I don't even know if it's possilbe to access the OS's built in sounds.
Jim
Will likely cross post this to the iOS board.
Re: Play sound file with local notification
My apps play sound when they receive a push notification when the app isn't open. It's not a custom sound though.
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Play sound file with local notification
It's a system setting, the user has to turn it on. On Android notifications can be granular down to the individual app, I'm not sure about iOS.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com