Hi guys,
I want to make an alarm clock app.
A few questions arise before even trying to start this:
- How does the alarm trigger work? Does the app have to run constantly in the background and check the system timer?
- How do I force the device from sleep mode into starting an app (i.e. the actual alarm ring)?
- (bonus): How do I force the device to boot itself, in case it is shutdown
Is this even possible in Gideros, or should I go directly into Android?
Greetings
Comments
it would probably be easier to create it in Android directly, with all those available alarm clock examples
Likes: antix
So is there a way to have a (Gideros) app run in the background? For example, if I have a countdown timer running and then goes to the device's home screen, or put the device to sleep - can I have the app still counting down in the background and sound the alarm when finished? (or even better, bring the app forward)
I realise that the answer may involve diving deep into iOS or Android code instead, but I'd like to stay within lua as long as possible...
On android, your app can be awaken by a service, either a system service (alarm clock, gps, etc) or your own service. As a result an intent is sent to the app which is processed by your custom android code.
On iOS, your app can receive CPU cycles in background for a few specific uses (iOS background modes), such as gps, bluetooth peripheral, attempting to finish a lengthy task (up to a few seconds), etc
As far as gideros is concerned, all that stuff require specific OS support. I recently added background GPS support, but that won't work for an alarm clock, and actually I don't know any way to make an alarm clock on iOS (except by forcing the app in foreground!)
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: saeys
The plugin have to be installed manually, not sure if I've done it correctly. Also, the notification plugin installation instructions seems to be outdated when looking at the AppDelegate files.
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: saeys
Unfortunately, I've read the discussion that @oleg is linking to and it doesn't lead me anywhere (it's almost 4 years old). I think someone (qualified) (and I'm not ) should go through the notification plugin, at least the installation part (or integrate it (as far as possible) into Gideros plugin export). I don't think it's up to date. Obviously it is a plugin that may be of use to some folks.
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: totebo, SinisterSoft