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

Play sounds in my application even though ringer is in silent mode

I have an application and I need to block the ringtone and notification sounds/vibrations, and play a custom sound while the phone is in incoming call state. The way I'm trying to do that is to set the ringer mode into silent mode, when my…
dor506
  • 5,246
  • 9
  • 44
  • 79
0
votes
1 answer

How to get information about SOUND CHIP or Sound capabilities of the device?

It is possible to get information about the sound chip or at least the sound capabilities of the device programatically? I can't find nothing about it
NullPointerException
  • 36,107
  • 79
  • 222
  • 382
0
votes
0 answers

Bluetooth Headset picking up noise - how to activate noise suppressor like NoiseAssassin

I'm recording my voice through a Bluetooth headset (ERA JAWBONE) and playing it in realtime on the phone speaker. This works with the following code: buffer = new byte[buffersize]; android.os.Process.setThreadPriority( …
0
votes
0 answers

Is it possible to determine AudioHAL from AudioFlinger code in Android?

Audio HAL can be different in each system. How to determine the AudioHAL file for a system? Is it possible to determine it from AudioFlinger code?
codedoc
  • 2,079
  • 2
  • 11
  • 15
0
votes
1 answer

How to get mp3 file uri and play it in android programatically

I want to make a application in which i play the .mp3 file i play the sound by selecting it from raw or asset folder which is hard coded in code. But i want that user pick any mp3 file anywhere from their android phone and make play it Can any one…
user3765485
  • 69
  • 2
  • 9
0
votes
1 answer

Video can only be heard if starts automatically (Android 2.3.5)

I am having the following situation; if I go to my PlayerActivity (which consists of a SurfaceView and a custom media player) and try to start the video automatically at the end of onCreate by triggering the method playAudio(View v) connected to the…
0
votes
1 answer

Voicecall recording using MediaRecorder giving java.lang.RuntimeException: start failed

I am trying to record the voice using MediaRecorder when a call comes in and goes out from a phone. I have implemented a BroadcastReceiver to know the states, when the state goes to OFF-HOOK, it starts recording and stops the recording when it…
0
votes
0 answers

Android : How do I get the HW volume buttons to change speaker volume in speakerphone mode?

Which API calls do I have to make to get the hardware volume control buttons to control the speaker volume when in speakerphone mode ?? I have tried to call setVolumeControlStream(AudioManager.STREAM_MUSIC) but that doesn't help. The HW vol buttons…
user1884325
  • 2,530
  • 1
  • 30
  • 49
0
votes
1 answer

android audio manager in receiver class

Not switching back to the mode what user have used. I mean when phone is in silent and i used to ring for some selected numbers but it does not switch back to normal mode when phone state is idle. here's my piece of…
Mayank Nema
  • 223
  • 2
  • 7
0
votes
1 answer

AudioManager NullPointerException for Release version

When I run my code in Debug from Android Studio my app work good, but when I create the APK and install it on device and start my app, the app get NullPointerException error and get killed( using Android Debug Monitor). Here is the code: public…
0
votes
1 answer

Android service to receive notification when volume changes

My application runs in the background and gets a notification when the volume on the device changes. The service then has to show a warning message based on the volume levels. What kind of a service should this be. Thank you.
0
votes
1 answer

Controling sound from app and incoming calls and SMS

I am making a music player where I need to stream some music from URL. Anyway, I want to control sound from application when I have incoming call or when I recive SMS. I found that there could be two ways how to do it, with AudioManager and audio…
Zookey
  • 2,637
  • 13
  • 46
  • 80
0
votes
1 answer

mediaplayer gives me null pointer exception

I want my code to play a sound file at MAX volume when a button is pressed. My code works perfectly fine just playing the sound file, but when I throw in originalVolume int originalVolume = mAudioManager …
The Tokenizer
  • 1,564
  • 3
  • 29
  • 46
0
votes
1 answer

How to find out whether audio playing is media or voice?

I am working on an android app that does audio routing to speaker/wired headset. Given that some audio is playing, is it possible to programmatically detect whether the audio playing is a song (media clip) or if it is voice from an established call,…
SoulRayder
  • 5,072
  • 6
  • 47
  • 93
0
votes
0 answers

Mute notification and play own sound

I want to replace the notification sound if my app is running. Therefore I have used the AudioManager to get the Request. Also I have used it to mute the Notification. To play the sound I use the MediaPlayer The Code looks like this: final…
StefMa
  • 3,344
  • 4
  • 27
  • 48