Reputation: 47
I'm building an alarm clock for iphone on corona sdk
I have used local notifications to fire the alarm when app is in background(or even when it is removed from memory - the memo's notification still come up, altho without any sound anything I should know about sound and corona? the phone vibrates, but no sound that I defined is playing. I used caf and mp3 files. Will try wav and update this post. But thats not the problem.
What I want the phone to do is to launch or open or bring from background my alarm clock at the point of notification. So user can set alarm. restart the phone or whatever (delete app from memory) but when the notification comes - I want to open up my app. Is this possible? I know I can send data with notification(to set a specific state) - but is there a command to launch app? force open?
also I don't get pop up notification with the code I'm using, I get the memo thing( when the top part of display rotates and displays your message) - how do I setup a pop up with controlls?
Thank you
Upvotes: 0
Views: 747
Reputation: 6296
This cannot be done at all.
Corona SDK (unless you are using enterprise) is very constrained, and some os those constraints are related to it being a cross platform SDK.
Corona currently takes a very conservative approach relating to what it can do in the system, it writes files only to is own sandbox, it does not access SD cards on Android, don't read the user photo gallery, and so on.
And it cannot be left running on the background, neither it can be launched using a notification, making it unsuitable for alarms, lullaby apps, schedules, background media player, or anything of that sort.
Corona focus is games, and multimedia apps with active user engagement.
Upvotes: 0