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

Options not working on Volume actions

LG L56VL

Display, Sound and Label options don't seem to work on any of the Volume actions. I don't see any pop-ups or hear any sounds when the action is run.

For example, if I check the Display box on the Ringer Volume action, nothing is displayed when the action runs. It does set the level of the volume stream correctly, but none of these options seem to work.

Any help appreciated. Thanks!
 
  • Like
Reactions: 1jknack53
I never used either of these options before you asked the question. I never saw the need.

I tried them on …
Motorola Droid Turbo 2 running Android 7.0 and Tasker 4.9u4m
Motorola Moto Z2 Force running Android 8.0.0 and Tasker 5.4.6b​
… with the same results.

For example, if the level of the stream is at 4 and display and sound are selected …
If you specify level 4 (unchanged) and run the action …
nothing is displayed and there is no sound​
If you specify level 5 (changed) and run the action …
there is a display and there is no sound​

You can follow the level set action with a Beep action using the same stream and it will play a beep on that stream at the volume you set.

… Thom
 
Upvote 0
Thank you Thom. So it sounds like your results for the Display and Sound options also were not as expected.

In my case, nothing is displayed and no sound is generated regardless whether the action changes the current volume or not. Those options don't seem to do anything at all.

I don't really want the sound option or a beep, what I really would like is to momentarily display the level of the stream for confirmation that it is set as I want it.

I am running my script via an icon, and currently get no confirmation that it was properly run unless I check the volume stream value manually after touching the icon. So I need to display of the level for confirmation.
 
Upvote 0
Setting volume levels happens to be my favorite subject.

The levels are provided in global variables …

Dev2
A1 Flash [ Text:%VOLA Alarm
%VOLB Blue tooth
%VOLC Call
%VOLD DTMF
%VOLM Media
%VOLN Notification
%VOLR Ringer
%VOLS System Long:On ]

… Thom

Thanks! I'm lucky I found you on this particular topic! I just started using Tasker and so far have only done some simple sets of actions to set all volume streams at once to silent, low, medium and high so I can set them with the touch of an icon. Works great (except that I can't get the options to work)!

Looks like maybe this is a custom user function to display the levels of the streams? Sorry, but don't know enough about Tasker yet to know how to use this. If it's not too much trouble, can you explain how use/call it?

Thanks again!
 
Upvote 0
Thanks! I'm lucky I found you on this particular topic! I just started using Tasker and so far have only done some simple sets of actions to set all volume streams at once to silent, low, medium and high so I can set them with the touch of an icon. Works great (except that I can't get the options to work)!

Looks like maybe this is a custom user function to display the levels of the streams? Sorry, but don't know enough about Tasker yet to know how to use this. If it's not too much trouble, can you explain how use/call it?

Thanks again!

Think maybe I see it... goes in as code/java function? I'll test it out...
 
Upvote 0
It is not Java or JavaScript code. It is a description of the Tasker task to display all 8 volume levels. It was created by …

Long press on the task name
Select the three dots at top right
Select Export
Select Description to clipboard
Paste the result in a post here

An example task to display just the Media volume level ...

Create a task
Select the large plus sign at the bottom right
Select Alert
Select Flash
In Text
type M
select the icon on the far right and select Volume - Media​
Select Long
Select the left arrow at the top left (to stop editing the Flash action)
Select the triangle at the bottom left (to run the task)
It then displays the Media Volume level preceded by an M

… Thom
 
Last edited:
Upvote 0
Don't know what I was thinking! Clearly it's not Javascript! Realized later it was Tasker specific code.

Thank you for this! So you exported the code for this. Is there a way for me to import it into my Tasker?

In the meantime, I got my script working with the Sound and Display options.

I have 7 actions each setting the level of a volume stream. Seems that if I set the Sound and Display options in the first few actions, it they work. But if I set them at say action 7, nothing happens. So I simply set the first action to show the level Display and it works (before I had the last action set to do this... that does not work). Strange, but it works!

Also, figured out how to make the level display whether the level is changed or not. I simply put a duplicate action for one of the streams on the list (before the action which sets it at the level I want) and set that duplicate at a different level. Then, when the action runs, it changes the level and displays the level indicator.

Example:

Action #1 sets Ringer at level 1
Action #2 sets Ringer at level 5

So when level 5 is set, it is always a change from the current level.

And I set the Display option on the level 5 (which is the level I actually want).

This way the level is indicated regardless of the current level.

Note: I really only need to display the level for one of the streams. So that's what I am doing. But the things you posted are really interesting and I am going to experiment with them for other scripts!
 
  • Like
Reactions: Thom
Upvote 0
Next challenge is to see if I can put multiple tasks on a dropdown list which can be accessed through a single icon on my homescreen. Then instead of having separate icons for low, med and high volume, I can have a single icon which triggers a list I can pick from. Less homescreen real estate. I'm assuming this is done with a "scene" ??? but have not looked at this yet.
 
Upvote 0
Hi Thom.. just posting this to thank you again for your help. To make it clear, I understood you posted the steps that would be used to recreate the script that you exported from Tasker. Thank you for going through all of that trouble for me! It was helpful.

I was curious though whether there is also a way to import such a script into Tasker just for future reference. In the case of a more complicated one I'm sure that would come in handy. No need to answer this unless you feel like it because its something I can research myself. But either way, thank you again for all your excellent help! I think I've got this particular script working into my happy place now thanks to you. :D
 
Upvote 0
Correction for the example I posted … they still have not added %VOLB to standard Tasker. What I use is shown below. I have a separate task that updates the global variable %VOLB ,,,

Dev2
A1: Perform Task [ Name:getVOLB Priority:%priority Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop:Off ]
A2: Variable Set [ Name:%tmp To:a%VOLA b%VOLB c%VOLC m%VOLM • d%VOLD n%VOLN r%VOLR s%VOLS Recurse Variables:Off Do Maths:Off Append:Off ]
A3: Flash [ Text:%tmp Long:On ]
getVOLB
A1: Java Function [ Return:audiomgr Class Or Object:AudioManager Function:new {AudioManager} (Context) Param:CONTEXT Param: Param: Param: Param: Param: Param: ]
A2: Java Function [ Return:%VOLB Class Or Object:audiomgr Function:getStreamVolume {int} (int) Param:6 Param: Param: Param: Param: Param: Param: ]

… Thom
 
Last edited:
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