I'm aware of the AutoAlarm plugin, and the root method that queries the alarm database.
But, I am looking to do this natively within Tasker (to package the project as a standalone APK in the future).
Is this possible?
Tested on my S5 mini, Android 4.4.2, root with GentleAlarm app.
Juergen.
With API Level 21 (Lollipop) or higher you can get the time in ms since epoche:
GetNextAlarm (13)
A1: Java Function [ Return:(AlarmManager)manager Class Or Object:CONTEXT Function:getSystemService {Object} (String) Param:alarm]
A2: Java Function [ Return:clock Class Or Object:manager Function:getNextAlarmClock
{AlarmClockInfo} ()]
A3: Java Function [ Return:%time Class Or Object:clock Function:getTriggerTime {long} ()]
Juergen.
A1 JavaFunction: contres = CONTEXT.getContextResolver();
A1 JavaFunction: contres = CONTEXT.getContextResolver();
A2 JavaFunction: %alarm = android.provider.Settings$System.getString(contres, next_alarm_formatted);
A3 Flash %alarm
Unfortunately getNextAlarmClock() also returns the time of the next time context used in Tasker - at least in the current beta release.
--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/5ecIH9fyn5M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
Yes, I've set Use Reliable Alarms to Always. If I set it to never I'm actually getting the next alarm time from the alarm clock and not the next occurring time context in Tasker.
Thank you for pointing out the issue with Tasker's Reliable Alarms setting and maybe with other apps using this feature!
But still looking for the solution how to find out reliably when the next alarm of the alarm clock will be.
Just make sure you read the next alarm clock while the screen is on and you're good to go
--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
I think I remember that disabling reliable alarms does not clear the next alarm set by Tasker. This is done when turning on the display.