I'm trying to get an alarm to go off when my calendar notifies me of an event. I can get the alarm to trigger but not switch it off. The only way I can kill the alarm is by forcing tasker to stop. Is there some way you can't kill the alarm or is this a bug as mentioned in the tip tool (Samsung galaxy Tab S3)
Understanding how your task is setup would be useful. Please look for the pinned post in this forum is you need help exporting the description of the task.
Alarm (5)
A1: Alarm Volume [ Level:11 Display: off Sound: off ]
A2: Play Ringtone [ Type:Alarm Sound: Stream:4 ]
A3: Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
A4: Cancel Alarm [ Mode: Disable Current Hours:0 Minutes:0 Label: ]
The two last steps in the profile is my attempt to stop the alarm as I can't switch it off when it triggers
I'm not aware of any way to stop a play ringtone action. The problem had to do with underlying android and the need to reference the original play ringtone instance.
Most people use music play instead with a music stop action.
The cancel alarm action is for system alarms, which you can set through tasker, but you would need to use an alarm set action.
When you choose a stream in a audio action (such as the alarm in your play ringtone), you're determining which volume control affects the sound. It's not the same as creating a system alarm.
ktmom said:
I'm not aware of any way to stop a play ringtone action. The problem had to do with underlying android and the need to reference the original play ringtone instance.
Most people use music play instead with a music stop action.
The cancel alarm action is for system alarms, which you can set through tasker, but you would need to use an alarm set action.
When you choose a stream in a audio action (such as the alarm in your play ringtone), you're determining which volume control affects the sound. It's not the same as creating a system alarm.
Click to expand...
Click to collapse
Thanks that seems to have done the trick.
Related
Happy Sunday Folks,
How are ye keeping on this fine day?
My intent is to open the "Add to playlist" screen for the currently playing track on the android spotify app directly by sending an intent to Spotify through tasker (screen cap attached of "Add to Playlist" screen. From messing around with catlog, I have found an intent in the spotify sdk that unfortunately is not working in it's current iteration.
A1: Launch App [ App:Spotify Data: Exclude From Recent Appsff Always Start New Copyff ]
A2: AutoSpotify Player State [ Configuration:Warning: To receive media events from the Spotify app you need to set Device Broadcast Status to ON in the Spotify app’s settings. Package:com.joaomgcd.autospotify Name:AutoSpotify Player State Timeout (Seconds):20 ]
A3: Send Intent [ Action:com.spotify.music/com.spotify.mobile.android.spotlets.playlist.activity.AddToPlaylistActivity Cat:None Mime Type: Data:spotify:track:%astrackuri Extra: Extra: Extra: Package: Class: Target:Activity ]
May I kindly ask if ye could help me with this?
I was fighting to do the same thing with AddToPlaylist. I use Pandora but make playlists for a friend who uses Spotify, of what I'm listening to. Unfortunately I was able to get the AddToPlaylist intent run but nothing was added. Best I was able to pull off was use AutoInput to automate it for me. I've attached an export if you'd like to take a look and see if it can be adapted to what you want to accomplish.
Pulls title and artist from Pandora notification and sets to variable
Strips "()" and any text between them from variable(Spotify has issues finding songs for me)
Opens Spotify and searches for the variable
Long clicks on the first SONG result
Clicks add to playlist
Clicks first playlist
Clears search
Goes home
It can probably be cleaned up/improved but it works for what I need it to do.
Requires:
AutoInput plugin
Notification Listener plugin
KC Tasker Processes plugin
The task is triggered by a time based profile, every day at 11:59 pm.
Set alarm (94)
A1: For [ Variable:%count Items:2:12 ] If [ %tit1 !~ shift ]
#a for-loop with up to 11 cycles, if condition to stop the loop, once an entry with the proper title is found. Since the "Test App" action checks at a certain point in time for an entry, we have to check every hour seperatly. 1st cycle will check for an calendar event starting at 2am, 2nd cycle will check at 3am and so forth. Last cycle will check for events starting at 2pm, because i expect myself to be woken up till then without an alarm clock.
A2: Variable Set [ Name:%times To:3600*%count+%TIMES Do Mathsn Appendff ]
#the "Test App" action requires the time of when to check for an entry so we prepare a variable by adding one hour in seconds, multiplied by the cycle item (2-12), to the device time. If ur calendar event duration (start to end) is less than one hour u have to double the amount of cycle items (2-24) and multiply it by 1800 in order to check for an entry every 30min.
A3: Test App [ Type:Calendar Start (Seconds) Data:%times Store Result In:%res Continue Task After Errorn ]
#if an calendar event is found at %times, it will write its starting time into the array %res
A4: Test App [ Type:Calendar Title Data:%times Store Result In:%tit ]
#this will write the events title into %tit.
A5: End For
#self expaining
A6: Stop [ With Errorff Task: ] If [ %tit1 !~ shift ]
#the task stops, if all cycles are executed and no calendar entry is found.
A7: Variable Convert [ Name:%res1 Function:Seconds to Medium Date Time Store Result In:%dat ]
#if u dont have overlapping calendar events, %res (still an array!) will have only one entry. So we convert it into a human readable format and save it inside %dat
A8: Variable Split [ Name:%dat Splitter: Delete Baseff ]
#we want only the time and not the whole date so we split at every whitespace
A9: Variable Split [ Name:%dat4 Splitter:: Delete Baseff ]
#now we have %dat4 in the format hh:mm but the "Set Alarm" action requires the providing of hours and minutes seperatly. So we split once again, this time ofc at the ":"
A10: Variable Subtract [ Name:%dat41 Value:2 Wrap Around:0 ]
#reducing the hours by 2 to have the alarm ring 2 hours before the event starts.
A11: Set Alarm [ Hours:%dat41 Minutes:%dat42 Message: Confirmff ]
#self explaining
Iam going make this guide more fancy (screen shots and more explaination) later.
Best regards, Chillmann
Screen-shot would have been useful. Thanks anyway.
this is actually UNBELIEVABLE!
I have the mostly same thing and was thinking of writing a similar guide like this the other day.
My version has some minor difference, of course, but the concept is mostly the same.
Again, unbelievable!
Don't forget to share the task/project xml.
I finaly found what I was looking for.
I am a starter with Tasker.
I entered the task but I get a error
Variable convert: %res1: no value.
What did I do wrong?
Hello,
I have a big zerolemmon battery so i don't care about using it with bluetooth alway on
I don't know why sometime (randomly) my phone turn off BT, so for the moment i set bluetooth on when my launcher is open ...
Anyone has a better idea to keep bluetooth alway on ? (with or without tasker)
I am root
Thanks for your help.
Use Tasker to add a periodic check on BT status, and if off, then turn on again?
This is how I have used Tasker to perform the same result:
Code:
Profile: BT Check (43)
Restore: no
State: BT Status [ Status: Off ]
Enter: Enable BT (86)
A1: Wait [ MS:0 Seconds:30 Minutes:0 Hours:0 Days:0 ]
A2: Bluetooth [ Set: On ]
In order to set the RESTORE to NO, once you have set your profile and your task, long click on the profile and select settings from the top bar. Can also see attached profile xml.
The wait action is also important, as it will prevent Android from disabling the BT instantenously. It might be because Android has a cool-off period once BT status is changed in order to ebable/disable the service.
Thanks mate, i add your profil on m'y phone. I'll tell you if it's fine in some days but it seems to be perfect.
Works perfect Thanks again
Hi!
..trying since days something I want to build...
What I want:
I want to use an old Tablet as a Digital VideoFrame..
..when the Tablet starts a Video should play (with GoogleVideo Player) and after 10 seconds it should Pause..
..and when motion is detected the Video should toogle to Play and after 10 Seconds Pause..and so on...
With the App "Motion Detector" I am able to start the Video...but I am not able to Pause the Video..has anyone
an idea how to do this?
thx
7.even
I'd do something like this:
Profile: Shake For Video (16)
Event: Shake [ Axis:Up-Down Sensitivity:Medium Duration:Medium ]
Enter: Anon (23)
A1: Open File [ File:xxxx.mp4 Mime Type:video/* ]
A2: Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0 ]
A3: Media Control [ Cmdause Simulate Media Buttonff App: ]
The profile is triggered by an event > sensor > then choose how you want to trigger
Action 1 opens a video file
Action 2 waits 10 seconds
Action 3 Media > media control > pause
You could blend the use of Motion Detector by trigger the tasker task on the launch of Motion Detector and execute the pause command after 10 seconds.
..thanks for the answer...I did it that way but the VideoPlayer doesnt Pause or Stop or anything...
7.even said:
..thanks for the answer...I did it that way but the VideoPlayer doesnt Pause or Stop or anything...
Click to expand...
Click to collapse
Works for me, I tested before posting.
I'm on a Galaxy S10 Plus and have over 15 increments in all my sound controls. Tasker only has 15 increments. I've got Tasker set to lower my notification volume at work but Tasker's "1" step isn't low enough. My phone sound has the ability to go many steps lower than Tasker's "1".
How can I address this in Tasker to get the volume lower than 1 or to increase the sound increments in Tasker? Thank you!
A couple of thoughts...
If you use a variable entry set to 0, does it go lower? If you're not yet aware, tap the double arrow button to get to an input field.
Or, see if a custom settings action will give you fine grained control.
I'm not sure how to use a variable entry to adjust the sound. Can you please elaborate?
Thank you!
ktmom said:
A couple of thoughts...
If you use a variable entry set to 0, does it go lower? If you're not yet aware, tap the double arrow button to get to an input field.
Or, see if a custom settings action will give you fine grained control.
Click to expand...
Click to collapse
https://www.pocketables.com/2012/08/beginners-guide-to-tasker-part-2-variables.html
I'm sorry but I don't see how to use a variable to set sound increments. Can you help? Thank you!
ktmom said:
https://www.pocketables.com/2012/08/beginners-guide-to-tasker-part-2-variables.html
Click to expand...
Click to collapse
I don't know what more to tell you. Create a variable, set it to a value (see the link that was posted) and use that variable in the action you are using to control the notification volume (tapping the crossed arrows to get the input field as mentioned in my first reply)
Hi - I tried using a variable with settings of 0.5 and it just takes the volume down to zero. I also tried setting the media volume to the lowest setting and recording what value that was in a variable and it just came up as "1" despite a value of 1 not getting me the lowest volume level. Has anyone figured out how to do this?
I have not figured out how to do this through Tasker.
It's clanky, but what I've done for the moment is to use Tasker to set Media Volume to zero, then in a simple loop I mimic pressing the "Volume Up" hardware button as many times as requested.
Task: Adjust Volume
A1: Media Volume [
Level: 0 ]
A2: Variable Set [
Name: %max
To: 17
Max Rounding Digits: 3
Structure Output (JSON, etc): On ]
A3: Variable Set [
Name: %num
To: 1
Max Rounding Digits: 3
Structure Output (JSON, etc): On ]
<loop>
A4: If [ %num < %max | %num = %max ]
A5: Button [
Button: Volume Up ]
A6: Variable Set [
Name: %num
To: %num + 1
Do Maths: On
Max Rounding Digits: 3
Structure Output (JSON, etc): On ]
A7: Goto [
Type: Action Label
Label: loop ]
A8: End If
A9: Flash [
Text: %VOLM
Continue Task Immediately: On
Dismiss On Click: On ]
I have the final Flash in there just to check out what Tasker is calling my required volume; I'll clearly be taking it out when I put the task into implementation, if I decide it works at least well enough for me.
For the record, I have a Samsung Galaxy S10e, on which I have used Sound Assistant to increase my volume rocker steps to 30.