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

Create a Toggle task for Media volume using NFC

mitch1604

Lurker
Hi all,

I am a noob when it comes to Tasker. I'll get to the point. I have used a step through to be able to change media volume from say 12 - 2. I have been able to write this to an NFC tag using NFC Tools to activate the Tasker task.

What I would like to do is use 1 tag to be able to toggle the volume from 12-2 and back to 12.

Not sure if this is a NFC question or a Tasker question.

As I said, a noob, and didn't really know what I was writing into Tasker. So, please, if you could reply with specific details, that'd be appreciated.

Thanks
 
Try this as a starting point ...

VOL
A1: If [ %VOLM !~ 2 ]
A2: Media Volume [ Level:2 Display:Off Sound:Off ]
A3: Else
A4: Media Volume [ Level:15 Display:Off Sound:Off ]
A5: End If
A6: Popup [ Title: Text:%VOLM Background Image: Layout:popup Timeout (Seconds):1 Show Over Keyguard:On ]

... Thom
 
I attached the screenshot of the step through i followed. I don't necessarily need to follow this method. It's just the best i could find, however it only accomplishes half the task.
 

Attachments

  • Screen Shot 2015-01-06 at 1.54.41 pm.png
    Screen Shot 2015-01-06 at 1.54.41 pm.png
    143.8 KB · Views: 288
They are in ... the Task and Alert areas of the "Select Action Category" menu.

The biggest challenge I faced with Tasker developments was learning how the Tasker user interface was organized. It is definitely not obvious and takes some work to lean. It is IMNHO worth it.

... Thom
 
Hi Thom,

I have managed to write the task you had listed. It performs the task. I also wrote the reverse of that task. It also works. My issue now is writing them both to a single NFC tag as the first task written always overrides the following task - Hence I don't get the volume down, then, volume up attribute.

Is there a way to write into the task the priority? Perhaps if the volume is up, then priority is given to the volume down task?

Regards,

Mitch
 
Hi @mitch1604,

I've had some luck in the past with using a NFC sticker to toggle between two profile states.

I would generally come up with a variable used to track the current state. The "On" Task would set %LOUD==1; the "Off" Task would clear variable %LOUD.

So then the profile triggered by the NFC would have a Task that looks something like this:
- If %LOUD Is Not Set:
- - Perform Task "Whatever You Use To Make the Volume Loud"
- Else:
- - Perform Task "Whatever You Use TO Make The Volume Quiet"
- End If
 
Hi all,

I just wanted to put up a solution for this. I did actually manage to create the task 2 years ago and have an NFC tag to toggle. Totally forgot how to do it again, then discovered my own thread 2 years later. Hilarious.

Anyway, have written a very simple task in Tasker:

If: %VOLM<15 (or whatever level you want the loudest setting to be)
Media Volume: level 15
Else
Media Volume: Level 4 (or whatever you want the quietest setting to be)


That's it. I wrote this to an NFC tag using NFC Tools and it toggles perfectly between quiet and loud.
 
Back
Top Bottom