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
0 answers

how can i appropriately change this error code(audioFx app for Android)?

I'm studying about audio effect(here audiofx for android api), processing audio recording in real-time etc and making a sample application project that can be released. I think I am almost completing my project. I simply referred a application that…
0
votes
1 answer

java.lang.NoSuchMethodException: dispatchMediaKeyEvent [class android.view.KeyEvent]

I'm trying to use media events to play, pause, next, previous music from my android application. When I run it on Samsung s4 (Android version 4.4.2), I can perform all actions. But I'm unable to perform those actions from my Nexus 5 (Android…
Alina
  • 130
  • 1
  • 13
0
votes
0 answers

MediaPlayer - Alarm is played in headphones AND on the phone

I create a MediaPlayer like in the appended code. Everything works fine, but I've one problem: whenever an alarm is played and I'm connected to headphones, the sound is played on the phone and in the headphones. I would like the phone to be quiet in…
prom85
  • 16,896
  • 17
  • 122
  • 242
0
votes
1 answer

Play sound through earpiece when using MediaPlayer

I am playing voicemail recordings in my app. The way I currently have it set up, it plays the voicemail through the speakerphone. What is the best way to be able to toggle between speakerphone and earpiece. Here is how I set up my MediaPlayer: …
Leo
  • 4,652
  • 6
  • 32
  • 42
0
votes
1 answer

AudioManager.setStreamMute not working in android 5 Lollipop

I'm developing a spam call filtering app and I'm trying to silence ringer for incoming (spam) call. The problem is none of AudioManager.setStreamMute nor AudioManager.setRingerMode is working in Lollipop. Here is my code snippet: public class…
K J
  • 4,505
  • 6
  • 27
  • 45
0
votes
2 answers

Audio manager nullpointerexception in service

I need help with that, i found one more same question but didnt work for me. Thats my code: import android.app.Service; import android.content.Context; import android.content.Intent; import android.database.Cursor; import…
0
votes
0 answers

Mute voice recognition bleep in Bluetooth Earpiece Android

I'm trying to get continuous voice recognition to work for a custom app on Android, using an ML18 bluetooth headset (by plantronics). I've managed to get rid of the beep produced by my phone by using the answers posted here and managed to route all…
MrHug
  • 1,315
  • 10
  • 27
0
votes
1 answer

Android: How to raise volume above safe level pragmatically

How can increase volume above safe level when headset connected, trying out this d't work, stop at safe level. AudioManager audioManager = (AudioManager)…
saikumar
  • 103
  • 1
  • 9
0
votes
1 answer

How to get device specifies for android_config_files

I am trying to update device specifications in android_config_files.xml but unable to find how to get or generate these tags.. please help
0
votes
1 answer

Set AudioStreamType for an audio file played from Resource (raw folder)

[First App] I am creating a sort of Alarm app that allows user to select alarm sound from either sd-card or app-supplied sounds. Since, the app essentially plays alarms, I want the volume to be 'alarm volume' of the device. I am able to achieve…
Shaishav
  • 5,282
  • 2
  • 22
  • 41
0
votes
1 answer

How can I control spotify music from a different app and pull information such as playlist and track currently playing? (ANDROID)

How can I control Spotify (for example) music from a different app (the one I'm making) and pull information such as playlist and track currently playing? (Android) I want to build a prototype app to control spotify's MusicPlayer (play, pause,…
Tomas
  • 27
  • 2
0
votes
2 answers

Android Bluetooth App audioManager issues

I am developing an app to control a speaker. I want the app to be able to playback music, do karaoke (play music and mic at same time), and provide a basic EQ to the user. My problem so far has been playing music through Bluetooth at all. My app:…
Paul Lehn
  • 3,202
  • 1
  • 24
  • 29
0
votes
2 answers

How to set ring volume to minimum?

Following code set phone to vibrate state, I want silent mode without vibration. AudioManager am = (AudioManager) getSystemService(getApplicationContext().AUDIO_SERVICE); am.setStreamVolume(AudioManager.STREAM_RING, 0, 0); Thanks in advance!
Matjaž
  • 2,096
  • 3
  • 35
  • 55
0
votes
1 answer

How to make Android microphone input independent from speaker position?

I want to do some audio processing on my Android device using its microphone input. Unfortunately, the audio processing I am using is very sensitive to the distance (so basically the Loudness) between speaker and microphone and the phone…
0
votes
1 answer

Android - useful thing when using the AudioManager

I have recently encountered something that caused me to pull out half of my hair off. I have tried to access the audioManager and to set a new mode like this: mAudioManager.setMode(AudioManager.MODE_NORMAL); With some reason which, in that time, i…
gor
  • 1,046
  • 1
  • 14
  • 28