Timer android app

It’s been a while since I posted something on my blog.
I’ve been busy learning a new great, free tool, Godot Engine, a game engine with lots of features for animation, scripting, .. , plays along with Blender really nice, can publish to all platforms, including html5. I love it already, but did not yet finish something using it. This will change in the comming year I hope. To create more good documentation and tutorials I supported the kickstarter of Nathan Lovato by the way, for version 3, that is comming up, which packs lots of goodness (3D stuff, the switch statement supported in the scripting , …)
The tool and language is already really good and it’s getting better, it’s still not as evolved as the flash platform which I’m very familiar with, but Godot may become superior to me hence it is free and open source software.

A year and a half ago I discovered meditation. One evening it was not going really good, I was a bit in a bad mental condition and thinking how I could fix this. I typed the word “meditation” in youtube which brought me to this video:

an American with Russian roots, who explains very well how to meditate, possible pitfalls and what benefits you get by meditating. Since that day I’ve been meditating 20 minutes every day, I am convinced about what he says and experience the benefits. My plan is to keep doing this every day, no matter what.

One of the things you need to meditate, like he explains, is a timer. I have android phones. The system always has a timer included next to the clock, but there’s mostly something that is not ideal. The time the phone vibrates to short, vibration OR alarm sound. I checked some free apps, but same story. First I was thinking about using Godot Engine for building a timer myself, but apparently you have to compile Godot yourself to get a phone to vibrate, for now. Mobile phone vibration is something I’ve already got done in a flash game, Micro Star Fighter so I decided to just use flash with the Starling framework and Feathers components, which are still moving forward. The development went pretty quick, it’s a very simple app, but during testing I noticed the alarm was going off 20, 30 second to even a minute over time. This was caused by the app being pushed to the background apparently. I googled it and found a solution: https://juankproblog.wordpress.com/2012/06/17/using-the-local-notification-ane-on-ios/
An, open source, native extension for flash, works on iOS and Android, that can send and receive special notifications. This does the trick, when the sent, timed notification is received again, the app is being pushed to the foreground or something and my code, that checks the timing on an Enterframe, is executed.
Important, this works good when the phone is not being used, when you meditate for example, but when the phone is used heavily, the timer is running in the background, the app can get killed and does not restart.

The special notifications can be sent and received with a device reboot in between. That works, but the app does not start automatically with that notification, only when you push the notification.
I was hoping it would start the app and have made it ready, so it can resume the countdown on schedule. This works, but you need to start the application again yourself after the reboot. That’s alright enough, for now 🙂 , I guess.
Several tests on a few devices proved to me that it works properly, so my simple Timer application is finished.
It’s in the google play store for free.


Because the app asks for a lot of permissions and I love using open source software, like Blender and Godot, I’ve made it open source on github
A lot of the asked permissions, I use, to enable (almost all optional through settings) vibration, notifications, keeping the screen from sleeping, but I actually did not need or ask network permissions, I was planning not to do this, but it is something ADT adds when compiling Adobe Air with a captive runtime.

Greetings, I’m back off to learning Godot.