Yes, several depending on what you want to achieve.
Use a profile Event 'Variable Set' on one of the many global volume variables such as, volume - system '%VOLS'.
Take a look at the variables page of the user guide for more info.
(1) Triggering by volume variable change is an interesting idea. There are some limitations …
%VOLA does not trigger
%VOLC does not trigger
%VOLM trigger with change by 1
%VOLD trigger with change greater than 1
%VOLN trigger with change by 1
%VOLR trigger with change by 1
%VOLS trigger with change by 1
The seven profiles to trigger …
(2) It would be great if I could combine them all into a single profile.
… Thom
(2) It would be great if I could combine them all into a single profile.
You probably could with an Intent Received, Event.
android.media.VOLUME_CHANGED_ACTION
Profile: VolAll (549)
Event: Intent Received [ Action:android.media.VOLUME_CHANGED_ACTION Cat:None
Cat:None Scheme:* Mime Type:* ]
Enter: VolAll (533)
A1: Beep [ Frequency:8000 Duration:1000 Amplitude:50 Stream:3 ]
A2: Flash [ Text:a%VOLA c%VOLC m%VOLM • d%VOLD n%VOLN r%VOLR s%VOLS Long:Off ]
In the Intent method a BTvoice change triggers.
BT appears not to be documented.
Use the extras to create your own,
IF, %android_media_extra_volume_stream_type_alias = 6
Var Set, %VOLBT - %android_media_extra_volume_stream_value
Sorry. I was referring to androids developer docs.
BT stream isn't documented.
What I would love to have is a variable %VOLBT that contained the value of BT Voice Volume.
Dev2 (217)
A1: If [ %android_media_extra_volume_stream_type_alias eq 6 ]
A2: Variable Set [ Name:%VOLBT To:%android_media_extra_volume_stream_value Recurse Variables:Off Do Maths:Off Append:Off ]
A3: End If
A4: Flash [ Text:%VOLBT Long:Off ]
That task attached to the previously created 'intent' profile should allow you to monitor the BT stream.
The following is a profile to set it and a test task to manipulate it. There are two remaining challenges …
It has to be run once to finalize the global variable with the correct value.
There is a half second wait before the Flash. Without it the Flash was executing before %VOLB as set.
Profile: VOLB
Event: Intent Received [ Action:android.media.VOLUME_CHANGED_ACTION Cat:None
Cat:None Scheme:* Mime Type:* ]
Enter: Anon
A1: Variable Set [ Name:%VOLB To:%android_media_extra_volume_stream_value
Recurse Variables:Off Do Maths:Off Append:Off ] If [
%android_media_extra_volume_stream_type_alias eq 6 ]
Test
A1: Alarm Volume [ Level:7 Display:Off Sound:Off ]
A2: BT Voice Volume [ Level:15 Display:Off Sound:Off ]
A3: In-Call Volume [ Level:8 Display:Off Sound:Off ]
A4: Wait [ MS:500 Seconds:0 Minutes:0 Hours:0 Days:0
]
A5: Variable Set [ Name:%VOLB To:? Recurse Variables:Off Do Maths:Off
Append:Off ] If [ %VOLB !Set ]
A6: Flash [ Text:a%VOLA b%VOLB c%VOLC m%VOLM • d%VOLD n%VOLN r%VOLR
s%VOLS Long:On ]
… Thom
It has to be run once to finalize the global variable with the correct value.
Why bother to initiate the variable it will be set when a corresponding event occurs?
getVOLB
A1: JavaScriptlet [ Code:Ret, %VOLB Class, audiomgr Function, getStreamVolume
Par, 6 Libraries: Auto Exit:On Timeout (Seconds):45 ]
A2: Flash [ Text:%VOLB Long:Off ]
My first time on this path ... ever. Any help would be greatly appreciated. The following fails ...
You'll need to use Java (not JavaScript).
See below,
Audio BT (610)
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: ]
A3: Flash [ Text:%VOLB Long:Off ]
Also create another Java function for Action 2.