![]() ![]() This will of course only work if you have an alarm sound that can be easily divided into chunks, just like the bells in Progressive Alarm Clock. By having a bunch of sound files where the volume is increasing the progressive sound can be faked just by scheduling more local notifications. After 5 seconds more the sound will be played again. This will first display a notification and play the default sound after 15 seconds. Notif2.soundName = UILocalNotificationDefaultSoundName ![]() Notif1.alertBody = sharedApplication] scheduleLocalNotification:notif1] Notif1.soundName = UILocalNotificationDefaultSoundName This is a very crude example to show how the progressive alarm can be faked. He has divided the alarm sounds into chunks of say 10 s each with progressive volume levels. By scheduling many local notifications, one after each other. That said you can probably fake a progressive alarm by doing what the developer of Progressive Alarm Clock do to play the progressive alarm. ![]() I would say what you want to do is not possible with the current restrictions of iOS. For example, Night Stand HD can play iPod music while in the background, and an app named "Progressive Alarm Clock" can play progressive sound while in the background.Īny ideas and suggestions on these issues? Any of your help will be greatly appreciated I also can't understand how some other apps are doing some of these features. However according to Apple's documentation iPod music playing(and use of shared resources) is still not allowed for an app that is playing background audio. But again how will I know if user cancelled the local notification alert and stop playing audio. Now I'm thinking of using background audio playing option and play silence until the alarm time, and then play the alarm sound while also showing a local notification without sound. Also you are not get notified when the user cancels the notification alert, iOS just stops playing your sound. Moreover, alarm sound must be played in background in a loop until the user cancels or wakes the app.įirst logical thing that came to my mind was to use local notifications, but with local notifications you can play sound files that are only in app bundle(not iPod music) and that are at most 30 seconds long. Alarm sound can be set to play as progressive. Alarm sound can be a music from the user's iPod library, and also some sound files in application bundle. ![]() I need to play selected alarm sound whenever the alarm time comes with some properties set by the user. However, I'm stuck with some limitations of the sdk. I'm making an alarm clock app with multitasking support. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |