After a bit search in the forums, what I found is all about setting volume. Could anyone tell me how to I get the System Volume for Device Ringtone, Media and Alarms ?
There is a paid extension from Taifun that does this (actually not completely paid, there is a free part and a paid part, but your requirements need the paid part).
Get current ringtone. Type can be RINGTONE, NOTIFICATION or ALARM. Thank you James and chabooya for being the sponsors of this method.
Note: as Triratna found out here: after setting another ringtone outside of the app (for example in the default ringtone app), the extension does not refresh and still will display the previously set ringtone. As workaround, restart your app to get the correct ringtone
@Gordon_Lu This extension is for setting volume. And I'm using the free and limited version of this to do the task.
But my main concern is about getting system volume.
This exists only in the paid part.
Let me try to make an extension for you real quick...it may not work (70% of my extensions that I have attempted do not work).
No actually the getRingtone() is in the free one too.
But I want the volume only.
Many thanks Gordon.
You could ask the community for help then to make the extensions work.
There you go. Sent you a PM. Test that extension please. Thank you.
Ok I'm gonna test it now.
It will take me some time cuz I can test only compiled apps.
Thanks for helping me.
Hey is the getStreamVolumeVoiceCall() for call volume or ringtone volume ?
Should be call volume.
I tested them. They are working, aren't they?
I tried the getStreamVolumeMusic().
It didn't work.
It was constantly getting the System Volume as a fixed volume, something nearly 10, while my system volume was 100.
Just like Ringtone in Taifun's extension, you (might) have to reboot the application. I went to the Settings app > Sound and vibration, and adjusted the volume for Media. The GetStreamVolumeMusic matched it.
I rebooted the application more than 3 times before replying.
Ok, how about this one?
Ringtone: GetStreamVolumeRing (disable Do Not Disturb)
com.gordonlu.volume.aix (6.0 KB)
Wait a second before I try it.
Not working bruh...
Gonna try vknow360's extension.