Detect and store current volume levels, modify them for some specific task, and restore whatever was set before i modified it.

1,162 views
Skip to first unread message

Roberto Cocchiararo

unread,
Nov 26, 2012, 4:09:04 PM11/26/12
to tas...@googlegroups.com
Is it posible ? the variables which hold volume level refuse to be directly modified.

So, i can check the current lvl, but i have no way to set it to that value.

I could set a TON of nested "ifs", and many "profiles" (i have my own normal, high, night, cinema profiles), but thats not idea, unless there is no other way xD

ps: example:

Phone call comes > Detect current volumes > lower ring volume to 0 > read caller (through media volume) > restore ringer volume

(I do it like that cause hearing the ringtone + caller is not always clear)

thxxx

Matt R

unread,
Nov 26, 2012, 4:31:17 PM11/26/12
to tas...@googlegroups.com
You can save the current level to a variable with Variable -> Variable Set.  You can also use a variable to set the volume level.  In the action edit screen (where you normally have a slider to set the level), press the circular blue arrows to switch to variable input (you may need to disable beginner mode under menu -> preferences -> UI).
 
Matt

Roberto Cocchiararo

unread,
Nov 26, 2012, 4:41:01 PM11/26/12
to tas...@googlegroups.com
My hero xD



--
Roberto Cocchiararo

My profiles: Facebook LinkedIn Twitter MySpace YouTube Tumblr Picasa Photobucket
Contact me: Google Talk/ rcocchiararo Skype/ rcocchiararo MSN/ rcocch...@gmail.com

Roberto Cocchiararo

unread,
Dec 9, 2012, 10:16:04 AM12/9/12
to tas...@googlegroups.com
Buu

I thought i was done with this, but no :(

My task does the following:

Store Ringer volume (%VOLR) in my variable %RINGVOLUME
Set ringer volume to 0
Read caller
Set ringer volume to %RINGVOLUME

It seems to work fine on my Galaxy Nexus (android 4.2.1), but on my Galaxy S3 (first with 4.1.1 and now with 4.1.2), it stores 1 or 0 on my variable (no matter what ringer volume was set at) and then restrores that, instead of the correct volume :(

nanobrain

unread,
Dec 9, 2012, 11:23:31 AM12/9/12
to tas...@googlegroups.com
I see the same thing. It looks like you are falling victim on the SGS 3 to the same things as discussed here: https://groups.google.com/d/topic/tasker/Xfk8arHA8SA/discussion. I see that the ringer volume is set to 0 (vibrate), but immediately set to 1 thereafter. You could try to set the ringer volume to 0 twice, but that doesn't explain why your volume variable doesn't store your initial setting. 
Reply all
Reply to author
Forward
0 new messages