Displaying the next alarm is a very common thing for Android apps, and you can often find widgets, lock screen replacements, and clock apps that do this with no problem. That’s because it’s not that hard to get the next alarm time from the system, assuming that you’re an app.
If you’re not an app, it’s slightly harder. Scratch that: it’s a nightmare. Tasker users have been using an awkward work around for this issue for years, involving running sqlite3 code via a Tasker plugin. That plugin is no longer being updated, and doesn’t work on a lot of newer devices. I spent ages trying to find a work around, eventually giving up and doing something different. Instead of being able to trigger a task before the alarm goes off automatically, I had to set when that was going to be as well as the alarm. Not ideal.
Luckily, the solution to the problem is now available in Google Play. João Dias, known for apps like AutoRemote and AutoShortcut, now has an app available called AutoAlarm, which fixes this problem. Once installed, you’ll have a new action and a new context in Tasker. The action simply sends off a message to the system, asking for the next alarm. The reply triggers the context (meaning you need to set up a profile using it), and you then have a ton of local variables to choose from that give you the next alarm in different forms, such as %minutes, %year, %hour, and so on (listed in the Google Play description).
This plug-in is now a vital part of my sleep mode. At 5:50 every morning, a profile triggers that runs the AutoAlarm action. The reply from the system triggers a second profile, which initiates what I call “sunrise mode.” Starting 25 minutes before the alarm, it gradually raises the light in the room by about 20% every 5 minutes, simulating a sunrise. Before the plug-in was available, I had to set sunrise mode manually, because the old method for getting the alarm time doesn’t work on my device.
It’s a very simple plug-in, but it’s also invaluable if you need to know when the next alarm is.

Download: Google Play
Edit: How-to video



















This is awesome. Although I am sorry to hear that you have to wake up at the crack of dawn. Thanks for the tip.
Hey mate, I m having trouble making sense of this plugin :/
Can you share a basic profile you’ve made so I can play with it?
Added a tutorial video to the article
Legend!!
Hey love your Tasker articles.
I did exactly what you showed in the Video but when I run the Task nothing happens. Sometimes I get a Msg that AutoAlarm chrashed. Any ideas?
Hmm, you set up the profile that receives the response back right? If so, sounds like a bug. Post a thread here http://www.pocketables.com/forum//forumdisplay.php?f=125
and I’m sure the dev will lend a hand
Can AutoAlarm check other Alarms then the Android O/S alarms?
For instance if I set an alarm in the software Gentle Alarm, AutoAlarm doesn’t seems to handle those “3rd part app alarms”…
I use alarm clock plus, which I find to be better for my use than gentle alarm, and it works with that. Ive had questions regarding gentle alarm on other alalarm centric articles, and it frankly sounds like that app doesnt support any standard android feature