• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

I need tasker help desperately

MsL

Well-Known Member
Aug 10, 2010
141
6
I posted this in another thread but I really need help as the problem is driving me crazy:

I finally got my task to work I believe to have my text messages and my phone calls announced thought my headset when the bluetooth is connected: This is what I have:

Media Control Pause stimulate Media button on
Say text/phone call
Media Control Toggle Pause Simulate Media button on

Now this works perfectly. Most time I either have Pandroa or my native music player playing music though my bluetooth at the same time and it does what it is suppose to: stops music say text/phone, resume music.

The problem comes in when I don't have any music on, after saying the text/phone call it will start to play music from my native music app anyways. What can I do to not have music played if there was not music being played before the text/phone call came in.

I need a variable that says that if the music wasn't playing before, that it's shouldn't play afterward.
 
I posted this in another thread but I really need help as the problem is driving me crazy:

I finally got my task to work I believe to have my text messages and my phone calls announced thought my headset when the bluetooth is connected: This is what I have:

Media Control Pause stimulate Media button on
Say text/phone call
Media Control Toggle Pause Simulate Media button on

Now this works perfectly. Most time I either have Pandroa or my native music player playing music though my bluetooth at the same time and it does what it is suppose to: stops music say text/phone, resume music.

The problem comes in when I don't have any music on, after saying the text/phone call it will start to play music from my native music app anyways. What can I do to not have music played if there was not music being played before the text/phone call came in.

I need a variable that says that if the music wasn't playing before, that it's shouldn't play afterward.

You need to set a variable before you pause that will decide whether it will play after announcement. The variable that tells you that there is a song playing is %MTRACK

Something like this:

Incoming call/text
Variable set %Music_Playing to 1 if %MTRACK is Set
Toggle pause if %MTRACK is set
Say announcement
Toggle pause if %Music_Playing matches 1
Clear variable Music_Playing
 
  • Like
Reactions: jackgibbs
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones