Volume controls in Android - need some help

  • #1
Wrichik Basu
Insights Author
Gold Member
2022 Award
2,044
2,296
Summary:

If you own an Android phone and are interested in helping me, please navigate to Settings → Sounds. Here, you will find the volume controls (in some phones, you will have an option "Volume" under which you will find all the controls). Please give me the following: a screenshot of the volume sliders (or a description, whichever is convenient for you), your device model and Android version.

Why I need this:

The volume keys in my phone (a Samsung Galaxy On7) are malfunctioning. I decided to write an app that will have all the volume controls. I will place it in my home screen and thus be able to quickly change the volumes instead of navigating to Settings.

Now, I found that volume control in Samsung differs from original Android image provided by Google. In Samsung, there are separate sliders for Ringtone, Notification and System streams, while in the Google image, these three are clubbed together under "Ring volume":

1593127333237.png


I don't know about other devices.

When I am coding an app, it will be useless to write something that works on Samsung and not on other devices. With the information you provide, I will be able to customize my app such that it supports as many devices as possible.

N.B.: There are some apps available in PlayStore that do the same thing (or almost the same thing). I am interested in writing my own app because that way I will be able to gain some experience in Android programming.
 

Answers and Replies

  • #2
phinds
Science Advisor
Insights Author
Gold Member
2022 Award
18,219
11,245
Sounds like a good project. I'd help if I could but I'm a dinosaur, still using a flip phone.
 
  • Like
Likes Wrichik Basu
  • #3
mcastillo356
Gold Member
487
213
Hi
My device(first of all I'll tell you I am basque(spanish for someones, just basque for others), so I don't know if my post is going to be usefull).
Here it goes:
Device: LGK4(2017)
Android version: 6.0.1

Volumen
Tono
Notificaciones
Táctil y sistema
Multimedia

Hope it helps
 
  • Informative
Likes Wrichik Basu
  • #4
berkeman
Mentor
64,457
15,834
LG K8 V
Android 7.0

Tap on: Settings, Sound, Volume

The controls are horizontal sliders like you show, with these controls:
  • Ringtone
  • Notification sound
  • Touch feedback & system
  • Music, video, games & other media
 
  • Informative
Likes Wrichik Basu
  • #5
Wrichik Basu
Insights Author
Gold Member
2022 Award
2,044
2,296
@mcastillo356 and @berkeman thank you for the information. Can you provide one more information: if you drag the ringtone volume slider to 0 (and thereby put your phone into mute or vibrate state), do the notification and system volumes also become 0? If you again increase the ringtone volume, do the notification and system volumes return to what they were before they became 0?
 
  • #6
berkeman
Mentor
64,457
15,834
if you drag the ringtone volume slider to 0 (and thereby put your phone into mute or vibrate state), do the notification and system volumes also become 0?
For me, Notification sound and Touch feedback & system go to zero.

If you again increase the ringtone volume, do the notification and system volumes return to what they were before they became 0
Yes, they returned to their previous settings as soon as the Ringtone volume is non-zero.
 
  • Like
Likes Wrichik Basu
  • #7
mcastillo356
Gold Member
487
213
Yes, they move simultaneously. Moving Tono makes Táctil y Sistema and Notificación also 0. And when I restore Tono, it starts to sound until I agree. I move the Tono from the maximum to 0, and from 0 to the maximum, and the other two move the same by themself.
 
  • Like
Likes Wrichik Basu
  • #8
Wrichik Basu
Insights Author
Gold Member
2022 Award
2,044
2,296
I programmed a test to distinguish between the two types of volume control.

In Android, it is possible to programmatically control the ringtone, notification, system, media, voice call, and alarm streams separately. We are interested only in the first three.

The test goes somewhat like this: first, initialize all the volumes to some number, say 1. Then, take up a particular stream (say ringtone) and change its volume to some number other than 1. Now, check whether the volume of the other two streams have changed or are still at 1. If they have changed, increment a counter. Next take up the other two streams and do the same with them.

At the end, if you find that on changing the volume of one stream the other two change automatically, you may conclude that it is the Google-type configuration (as shown in the picture in the OP). Otherwise, the three streams can be controlled separately.

This test successfully works in the emulators and my Samsung device, but it has to be tested further on physical devices to conclude that it works everywhere.
 
  • Like
Likes mcastillo356

Suggested for: Volume controls in Android - need some help

  • Last Post
Replies
1
Views
108
  • Last Post
Replies
2
Views
731
Replies
3
Views
667
  • Last Post
Replies
3
Views
602
  • Last Post
Replies
2
Views
479
Replies
8
Views
2K
Replies
8
Views
1K
Replies
5
Views
591
Replies
5
Views
4K
Replies
5
Views
1K
Top