Questions tagged [android-audiomanager]

AudioManager provides access to volume and ringer mode control.

AudioManager provides access to volume and ringer mode control.

AudioManager Class Reference

792 questions
0
votes
1 answer

How can I turn the phone volume increase or decrease or even mute with react native

I need to mute the phone by pressing a button on the app. How to do it? I don't find any library for this!
Golam Rabbani
  • 76
  • 1
  • 9
0
votes
2 answers

How to stop all music playing in background with Android (Java)?

I'm stuck with this last piece of code. I want an alarm to play when a button is pressed. The alarm plays over the MUSIC_STREAM, because it needs to be played through headphones/earpieces only so nobody else got disturbed. public void…
Kees de Vriesch
  • 124
  • 2
  • 14
0
votes
0 answers

Set volume by moving wheel of seekBar

I want to change the volume of ringing by spinning wheel of seekbar but my pretty simple code sometimes set phone to vibrate mode when the progress is 0 and sometimes when it's 1. Help me please. My code: final AudioManager audioManager =…
S.Drumble4
  • 139
  • 8
0
votes
0 answers

Changing ringer mode not working at first time in android

Below is my callreceiver brodcastreceiver which will call when any phone call will come. problem is i am changing ringer mode to silent when any phone call comes. but its not working at first time. and then working fine after that. i tried many…
0
votes
1 answer

AudioManager returning stream volume as zero even when phone volume is not zero

I am trying to enforce some behaviour in my app if phone is not in zero volume mode (silent mode or vibrate mode). This is my code: audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); if…
SoulRayder
  • 5,072
  • 6
  • 47
  • 93
0
votes
1 answer

Control Soundpool volume when receiving a call

I got an Android application which uses Linphone for VOIP calls. When I receive a call, I'm starting a ringtone of my own (a raw mp3 file) like this: final AudioManager audioManager = (AudioManager)ctx.getSystemService(Context.AUDIO_SERVICE); final…
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
0
votes
0 answers

How can I toggle the switch if the ringing volume change?

I want max volume when I launch the app so I getStreamMaxVolume in the onCreate. @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); swVolume =…
BEX
  • 187
  • 4
  • 21
0
votes
0 answers

How to On the switch if the ringing volume is at max and Off the switch if the ringing volume is less than max?

//set the Volume switch to ON swVolume.setChecked(true); //attach a listener to check for the changes in state swVolume.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void…
0
votes
1 answer

ProgressBar value does not change

I want to use the progress variable of onProgressChanged method outside of the inner class. I tried to use a method defined in outer class and called from inner class to get that value. But every-time I get 0. No updated value of progress variable.…
K.Malu
  • 11
  • 10
0
votes
1 answer

Unable to generate QR Code for changed SeekBar value in android

I want to create/generate a QRCode for the changed SeekBar value for Stream_Ring. But the problem is i am not able to get/save onProgressChanged method's progress value which i need in order to generate QR. I tried to find out the problem but unable…
K.Malu
  • 11
  • 10
0
votes
1 answer

Generating QR Code for android Audio Manager

I want to build an android application to generate QR Code based on audio settings(silent mode etc.) and later scan that QR & change the phone settings accordingly automatically just by scanning the QR. Would you please tell me how can i do it? I…
K.Malu
  • 11
  • 10
0
votes
1 answer

Setting silent mode at a specific date and time

I'd like to set the ringer mode to silent for specific events in the future. It should only happen if a checkbox in the preferences is checked. I know that I have to update the manifest for the permissions and also that I can set the ringer mode…
cody
  • 6,389
  • 15
  • 52
  • 77
0
votes
1 answer

Maintain volume with remotely connected bluetooth speaker

please any one can give me suggest this is possible or not. I creating an app for music in which i connect my app with Bluetooth speaker. Its connect well and playing also, But my question is that when we press volume + - button of speaker then…
Ankit
  • 1
  • 2
0
votes
0 answers

How to know if the media player is opening in background?

I am using Android 5.0 and 6.0. I want to check my default media player (calls from intent) is running/playing in background. Currently, I used the function AudioManager mAudioManager = (AudioManager)…
0
votes
1 answer

How to set ringtone in Android, using ringtone manager?

I am using the following code, but it doesn't seem to change the ringtone. What am I doing wrong, or is there an easier way to set an mp3 to ringtone? I have a uri that parses the location, and I call the following function. I know the uri is…
Brandon K
  • 73
  • 6