Tasker event charger unplugged

2,274 views
Skip to first unread message

Ayoub Issaad

unread,
Mar 29, 2017, 7:09:49 PM3/29/17
to Tasker
Hello guys,

I'm a new user of tasker so my question might be stupid but, yesterday before going to bed I wanted to put my phone into charge, but I also wanted to wake up when it reaches 100% to unplug the phone from the power source.

Using Tasker, I set a song to play when my phone battery reaches 100%, that's what happened, but when the song started playing, to my surprise there was no stop button., there was no way the pause the song or anything, my only solution was to reboot my device.

I decided to make the task better so the music stops when I unplug the phone from the power source, I've been searching the whole day but I couldn't figure it out.

If you guys can help, that would be great

Thank you in advance,
Sorry for my English.

Rich D

unread,
Mar 29, 2017, 7:34:57 PM3/29/17
to Tasker Google Groups Post




I decided to make the task better so the music stops when I unplug the phone from the power source, I've been searching the whole day but I couldn't figure it out.

It is always best to post any relevant tasks or profile descriptions.



To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).



The best way to do this is with a action/ media / music play then to stop use a action /  media / music stop

Ayoub Issaad

unread,
Mar 30, 2017, 3:03:46 AM3/30/17
to Tasker
Thank you for your reply Rich D,

From now on I'll be posting the profile descriptions, But,  how about the power cable unplugged, how can I add that to Tasker ?

Charles Bernard

unread,
Mar 30, 2017, 3:21:26 AM3/30/17
to Tasker
if you are using State>Power  to activate your profile that plays the song when 100% battery is reached, then add music stop as your exit task for that profile, then when you unplug, the profile should exit and stop the song.

Ayoub Issaad

unread,
Mar 30, 2017, 3:25:07 AM3/30/17
to Tasker
Thank you for your reply Charles, just to make sure, will the exit task run when I unplug or when the battery reaches 99% ?

Charles Bernard

unread,
Mar 30, 2017, 3:31:03 AM3/30/17
to Tasker
the exit task runs when your profile's context is no longer true.
if your profile is set to begin when you plug the phone in, then it will exit when the phone is unplugged.

Ayoub Issaad

unread,
Mar 30, 2017, 3:38:06 AM3/30/17
to Tasker
Thank you, but in my case my task is set to run when my battery level reaches 100% (State -> Power - >Battery Level 100%), do you think the exit task will run when I unplug in this case ?

Charles Bernard

unread,
Mar 30, 2017, 3:43:22 AM3/30/17
to Tasker
you can add state-power-power source to your profile context, which will make the profile only active while BOTH battery 100 AND plugged in are true.
then when you unplug, they will both NOT be true, the profile will exit, and the song will stop.

Ayoub Issaad

unread,
Mar 30, 2017, 3:47:45 AM3/30/17
to Tasker
Oh, Thank you so much, Charles, Definitely, that's what I need, thank you again

Ayoub Issaad

unread,
Mar 31, 2017, 3:28:51 AM3/31/17
to Tasker
UPDATE,

AFTER adding the state-power-power source-Any, my profile doesn't work anymore, and it doesn't even start playing the song when it reaches 100% and connected to the power (tried AC and USB on my pc).

Rich D

unread,
Mar 31, 2017, 5:48:56 AM3/31/17
to Tasker Google Groups Post

AFTER adding the state-power-power source-Any, my profile doesn't work anymore, and it doesn't even start playing the song when it reaches 100% and connected to the power (tried AC and USB on my pc).

What happened to ?

"From now on I'll be posting the profile descriptions"

Now would be a good time.... :)

Biggdadd73

unread,
Apr 3, 2017, 5:50:17 PM4/3/17
to Tasker
I just made this and it worked without problem:

Profile: Music Stop After Unplugged (66)
State: Power [ Source:Any ]
State: Battery Level [ From:100 To:100 ]
Enter: Music Alarm (96)
A1: Music Play [ File:Music/Shuffle/*Music_File* Start:0 Loop:Off Stream:3 Continue Task Immediately:On ]

Exit: Music Alarm Stop (141)
A1: Music Stop [ Clear Dir:On ]

pretty straight forward but let me know if you need help
Reply all
Reply to author
Forward
0 new messages