Start Floating Button

cska133

Member
Hi,

I use the app VirtualVolume Button which shows floating buttons for controlling the volume . The app starts automaticly on boot and displays the floating buttons for volume+ and volume-.
So far so good, but on my old device Android 5 somehow the floating buttons disappear suddenly. Excuting the app again does not show the floating buttons, only kill and restart the app displays them again. I created a macro when the app is closed the start the app again. But the result is that then the settings UI of the app is getting displayed but not its floating buttons.
So probably the app is not closed when the floating buttons disappear , and only its service...

Can some one helps me the create the appropriate macro? Maybe something with the app intent/service....? Or variables or what else?

Thanks
 
Last edited:

Josué García

MacroDroid Support
Staff member
Hi,

I use the app VirtualVolume Button which shows floating buttons for controlling the volume . The app starts automaticly on boot and displays the floating buttons for volume+ and volume-.
So far so good, but on my old device Android 5 somehow the floating buttons disappear suddenly. Excuting the app again does not show the floating buttons, only kill and restart the app displays them again. I created a macro when the app is closed the start the app again. But the result is that then the settings UI of the app is getting displayed but not its floating buttons.
So probably the app is not closed when the floating buttons disappear , and only its service...

Can some one helps me the create the appropriate macro? Maybe something with the app intent/service....? Or variables or what else?

Thanks
Did you check that the application does not have battery optimisation activated?

You can help you with more information here:
 

cska133

Member
In the app i dont see any battery optimizing settings. On the dontkillmyapp page i can not find how to search for my app? The phone i use is a no name china phone.
 

Andydroid

Member
Or just forget about the VirtualVolume Button app and create two macros in MacroDroid:

Macro VolumeUpButton
T: Floating Button
A: Volume Up

Macro VolumeDownButton
T: Floating Button
A: Volume Down

You can, of course, enhance the macros to replicate most/all of the features of the VirtualVolume Button app.
 

cska133

Member
And then i will have two floating buttons on my screen for Vol+ and Vol-?
These are the appropriate Trigger and Action for creating this macros?
You can, of course, enhance the macros to replicate most/all of the features of the VirtualVolume Button app.
what do you mean ? I can not set my own color or size of the floating buttons, right?
 

Andydroid

Member
Yes, you'll have two buttons: you can choose between 'normal' and 'small' size, you can choose colours and level of opacity, you can choose icons, you can choose the starting position on screen, and you can drag them around the screen to change position:
Clipboard.jpg

By enhancing the macros (you might need to write a couple of extra control macros), you can perform actions like show/hide the buttons when certain apps are launched/closed, you can vibrate the phone when buttons are pressed, you can define your own levels of volume increase/decrease etc.
 

cska133

Member
Is it possible to see the volume change when prressing on the floating button? At the moment is changes the volume but I dont see the volume Gui or % or any other indication
 

Andydroid

Member
You could use a Popup Message action to display the current volume...

... However this is where it gets slightly complicated: the MacroDroid Volume Up/Down action adjusts the volume of the *currently active volume stream* eg if you press the button when you're playing music, it will adjust the Media stream volume; if you press the button when the phone is ringing, it will adjust the Ringer volume etc.

The easiest way then is for your Popup Message to display all the stream volumes at once, or at least the ones you're likely to be using:
Clipboard.jpg

However, as you have an old version of Android, I'm not sure if volume streams worked then as they do now.

By the way, the Volume Change action (different from the Volume Up/Down action) allows you to set individual stream volumes.
 

Jacob L

Moderator (Lawsonator)
Some devices, you can set the default volume button to a specific stream. Media in my case
 

cska133

Member
However this is where it gets slightly complicated: the MacroDroid Volume Up/Down action adjusts the volume of the *currently active volume stream* eg if you press the button when you're playing music, it will adjust the Media stream volume; if you press the button when the phone is ringing, it will adjust the Ringer volume etc.
So the floatings buttons will change the volume of the media/music, alarm, ringer or notification depending on which app or what is acuelly displayed on my screen, right? For Ex. if I stream it will change the audio of the stream, if I then go the home screen it will change the ringer ton - correct?
But acctually how do the Vol+/- hardware buttons on the phone/tab work? Is it not the same way?

The easiest way then is for your Popup Message to display all the stream volumes at once, or at least the ones you're likely to be using:
so I have to add action "popup message" and then enter Music=[vol_music], Alarm=[alarm], ...? Or are these entries already there and pre-defined? Can you post a screenshot of this please.
Which volume streams are existing in general?
What is the difference between volume streams and stream volumes?
The volume for music and media (when playing video or live streams) are the same?

By the way, the Volume Change action (different from the Volume Up/Down action) allows you to set individual stream volumes.
what do you mean with that? My volume streams together with Music, Alarm, Notification and so on? What should one need this to have even more?

Sorry for the lot of questions
 

Andydroid

Member
Yes, the Volume Up/Down action in MacroDroid works in exactly the same way as pressing the hardware buttons.

The only reason we're talking about streams is because you want to display the volume: MacroDroid has a 'Magic Text' feature that enables you to obtain many system values from your phone; when configuring the Popup Message action, click the three dots on the right, and you'll see the many Magic Text values that are available:
Clipboard.jpg

As you can see, there isn't just one volume value, there are seven, so I was suggesting it's easiest if you simply display multiple volumes in the same Popup Message as in my screenshot in my previous post.

If you don't want to display the volume, you don't need to worry about audio streams. To learn more about streams, it's best to just Google it.
 

cska133

Member
I was suggesting it's easiest if you simply display multiple volumes in the same Popup Message as in my screenshot in my previous post.
ok, but can I select more then one volume? The MagicText values are "choose_one" or is multiple choice possible?

If choosing many volume streams and pressing the Vol+/- . then all of the choosen volumes will be displayed at once? Or only the actual volume depending on the actual app? For ex. I choose all the 7 volumes -> when wathcing video Vol+/- will display only the media volume popup and not all the 7 volume popups at once?

I dont have the phone now so thatswhy I ask. Thanks!
 
Last edited:

Andydroid

Member
You can only choose one Magic Text value at a time, but you can repeat the process multiple times to get several Magic Text values in one Popup Message action as per my screenshot. Then it doesn't matter which volume you change, as one Popup Message will display all of them. Give it a try, you'll see how it works.
 

cska133

Member
hi,
well i tried it and in deed it pops up but just a popup wizh some numbers. But i was thinking of a popup with volume bar just like when pressing the hardware button, it this possible?:sneaky:
 

Andydroid

Member
I'm pretty sure you can use the Send Intent action to launch the volume slider, but I don't know much about Intents I'm afraid- maybe someone else can help?
 

yos

New member
Hello
You can simulate the floating panel with a dialog box where the buttons call 2 macros ( volume up and volume down ) see the different captures.
sorry the captures are in french
dialog_vol.jpg
dialog_vol2.jpg

dialog_vol3.jpg
volume up

dialog_vol4.jpg

dialog_vol5.jpg
same for down volume
 

Attachments

  • dialog_vol3.jpg
    dialog_vol3.jpg
    17.9 KB · Views: 0
  • dialog_vol4.jpg
    dialog_vol4.jpg
    16.4 KB · Views: 0

cska133

Member
Thanks.
But the result is impractical because 1. When the dialog box appears the video stream/media interrupts so it is not possible to hear the changed volume stream and 2. If i want to change the volume in a big steps by repeate pressing +/- is not possible because the dialog box disappear after every tapping over +/-.
I believe that displaying the volume slider is the best solution, but dont know how?
 
Top