How to access an already existing alarm time

Post your questions and help other users.

Moderator: Martin

Post Reply
User avatar
Rhonin
Posts: 19
Joined: 08 Apr 2015 05:23

How to access an already existing alarm time

Post by Rhonin » 08 Apr 2015 05:58

Hi folx - i recently bought this mighty tool and successfully run two flows :D They support me on my way to work - The first is triggered by leaving my home WLAN and depending on my calendar's entries (shift-work-time) it automatically starts my audiobook app, activates BT , disables WLAN and sets the loudness to maximum. The second one runs after disconnected from the car's BT. They are working pretty good.

So i decided to dare the next steps:

One idea is that if on the next day i have to absolve an early shift (calendar entry exists - as trigger or condition - not sur about how to) set the phone into flightmode during the night, and set the alarm clock - an alarm time is already configured in the Stock alarmclock - app by sony - but i don't know how to access this alarmtime ?

Another idea is that if a whatsapp message comes in during connected to the car's BT it should be read to me over BT. I think of a variable {notification-text} or big {notification-text} that should be read by tts engine - Is this possible and what is the difference between both variables ?

I would really appreciate if there are some useful hints, because the help is really well structured but sometimes i mis a little some deeper information , maybe related to my little experience with this mighty tool

THX for your help and attention and MARTIN - GREAT JOB

Rhonin
Automagic on rooted Xperia Z3c running on Android 5.1.1

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: How to access an already existing alarm time

Post by Martin » 08 Apr 2015 19:26

Hi Rhonin,

Accessing the next alarm clock time can be done with action Init Variable Next Alarm, however Android does not have support for third party apps to modify existing alarms so when you use action Set Alarm it usually creates a new alarm in the alarm app and usually does not reuse an existing alarm (this might also depend on the alarm app in use).

The variable notification_text contains the text of the small/collapsed notification notification_text_big contains the text of an expanded notification (swipe down on the notification with two fingers when it's not already expanded). You can also check the contents of such variables by creating a flow with a trigger Notification on Statusbar Displayed and a condition Debug Dialog. The condition displays all available variables with the corresponding value when the flow is executed. The condition only shows the first few lines of long texts but you can also click on a value and select Show value in text editor to see the complete text.

Regards,
Martin

User avatar
Rhonin
Posts: 19
Joined: 08 Apr 2015 05:23

Re: How to access an already existing alarm time

Post by Rhonin » 14 Apr 2015 00:39

Hi Martin,

the debug option is really good - With it i found a "bug" if i got three or more WhatsApp messages the notification_text contains not the message text but the sender and the summary :?

Therefor i got now a little problem if i got more messages during my way to work - my little modul reads every message again, if i use notification_text_big. Maybe every message must be devided into its parts and assign them to new variables in a script in an iterative process. It should be possible to read only the latest message. Is this possible or do you have any experiences concerning my idea ? Maybe the message time stamp is another condition that could work ? I appreciate every hint from your side.

THX in advance
Automagic on rooted Xperia Z3c running on Android 5.1.1

lchiocca
Posts: 69
Joined: 15 Aug 2013 10:11

Re: How to access an already existing alarm time

Post by lchiocca » 15 Apr 2015 06:25

What you could do is: read the notification out loud and then discard the notification. These messages will still be unread in whatsapp but the next notification will only be the new message.

User avatar
Rhonin
Posts: 19
Joined: 08 Apr 2015 05:23

Re: How to access an already existing alarm time

Post by Rhonin » 16 Apr 2015 03:12

THX for your tip, but i have already tested the discarding of the notification in the statusbar, but as long as the notification is marked unread within the app all unread messages will appear in the statisbar again and will be read aloud. :?

If i find the time this weekend i'll try to experiment with an action script that convert the "whole" big_text into different strings. Then the strings will be sorted in a field by appearence time and some textpassages will be erased - f. e. "Whatsapp" and "X new Messages in Y chats" and also sended pictures and videos.

But that is only an ides and i'm not sure if i get it to work....

Cheers and THX again Ichioca
Automagic on rooted Xperia Z3c running on Android 5.1.1

Post Reply