Android Question Can I stop SetRingerMode from beeping?

GuyBooth

Active Member
Licensed User
Longtime User
When I trigger the code ph.SetRingerMode(2) to turn the phone ringer on, the phone beeps.

Is there some way to prevent this? I want to activate the phone ringer, but I don't want to tell the world I'm doing it.
 

GuyBooth

Active Member
Licensed User
Longtime User
I don't know, what you use, but "native" public void setRingerMode (int ringerMode) uses
2 - RINGER_MODE_NORMAL 0 - RINGER_MODE_SILENT 1 - RINGER_MODE_VIBRATE
Try zero instead of 2.

I am turning the ringer on, hence the use of 2, not 0. I use 0 when I am turning it off. It only beeps when I turn it on, but it is that beep that is causing my problem.
I have all the permissions set properly, the code does work. Just not quietly.
 
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
Try to mute or lower the volume of VOLUME_NOTIFICATION (?) channel.
Phone.SetMute or Phone.SetVolume. Make sure to read the documentation of these methods.

None of these was successful. Tried with the various Volume settings channels (VOLUME_NOTIFICATION, VOLUME_ALARM, VOLUME_SYSTEM, VOLUME_RING).

Seems others who have had a problem with the beep when the volume controls are adjusted, and some with rooted phones have solved it by disabling the sound file that plays. Not a solution for me, my phone is not rooted and I would not expect others to root theirs to use my app.
Not sure where to go from here.
 
Upvote 0
Top