android-audiomanager Questions

6

Solved

I'm trying to enable the speaker while I am in a call: final AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE); audioManager.setSpeakerphoneOn(true); I t...

3

Solved

I want to play some audio with volume lvl adjusted to ear aka. "phone call mode". For this purpose, I'm using well-known and commonly advised audioManager.setMode(audioNormalState ? Audi...
Sowens asked 19/1, 2022 at 10:4

2

Solved

I am currently writing an app that calls for the recording and real time processing of audio data. For this, I am using the AudioRecord class. This works all well and good, except the default setti...
Pulsimeter asked 28/4, 2012 at 4:13

1

I have a Flutter app. On opening the app, the app will play a muted video, till here it's perfectly fine. But when I play music in Spotify in the background, and then I try to open my Flutter app, ...
Recessive asked 21/9, 2021 at 9:29

2

I am trying to play sound on speaker even if headphones are on, BUT if there is music playing in background, I want the music to be played on headphones until the sound is played. So I am taking ...

0

I'm building a voice call app for android using WebView. Everything works fine except in android 12, I can not use the earpiece (or even wired headphones in some phones) for audio out. The audio is...
Tamatave asked 30/9, 2022 at 15:13

4

Having a little trouble bending my head around this one. In my volume control app I am trying to set the system sound profile to SILENT ONLY without triggering do not disturb, my app has access to...
Fervid asked 21/9, 2019 at 23:46

2

I am developing a voice call app for android using PeerJS and WebView. And I want the audio to play through the earpiece. Here is my code, private fun initAudio(){ am = getSystemService(AUDIO_SERV...
Acetic asked 5/11, 2021 at 6:38

2

This is what the file says, but I can't fully understand. /* modes for setMode/getMode/setRoute/getRoute */ /** * Audio harware modes. */ /** * Invalid audio mode. */ public static final int...
Vries asked 21/10, 2021 at 1:56

8

Solved

I have an app that mutes the phone by using AudioManager and setting ringer mode to silent with this code: AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVI...
Duct asked 25/8, 2016 at 17:32

1

Been struggling with the audio manager after the latest Android 11 rollout to Samsungs. It has been working smoothly for several years now including all possible Android 10 devices and below. Here ...
Hexachlorophene asked 5/2, 2021 at 9:13

6

Solved

I have found lots of examples how to get default ringtone. Something like that: Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE); Ringtone ringtone = RingtoneManager.getRi...
Miocene asked 19/3, 2014 at 10:41

8

Solved

I created a music player app and I want to set the volume up/down programmatically. I want to implement two Buttons to increase/decrease the volume and set to the media player. Activity: control = ...
Cuttlebone asked 2/12, 2016 at 5:57

2

Solved

is there a way to hide the volume change bar/notification (however you might call it..btw. how do you call it?) ? i attached a screenshot above. this bar is shown everytime i change the volume (...
Stereoscopic asked 28/1, 2013 at 13:34

3

In Android I need to get notified when the current audio mode gets changed. I can get this value through getMode() but this is polling. I don't want to poll every few seconds. What are my opti...
Candless asked 1/2, 2016 at 10:10

7

Solved

How can I accurately change the volume of my app using a seekbar without controlling the volume by the volume buttons on my android device? I have seperate function on the Volume keys on my android...
Capacitor asked 13/4, 2012 at 1:58

2

Solved

There's an app on my phone that keeps taking audio focus, even when no sound is playing. I'm wondering as an app developer if I'd be able to inform the user which app it is, or if I can tell if my ...
Incumbent asked 7/11, 2012 at 16:15

6

Solved

The method AudioManager.isWiredHeadsetOn() is deprecated from api level 14, how do we now detect if a wired headset is connected?
Roomette asked 18/1, 2013 at 15:0

2

Solved

I implemented a test app using SimpleExoPlayer which works fine. I would like now to add audiofocus to my app. To start playing with audio focus when the user launches the app is easy. Adding the ...
Daunt asked 14/2, 2017 at 14:1

0

I have a feature where I need to fetch current AND detect switch of the active audio output device of the system. Something like: run app -> fetch current device (which might be embedded speakers...

2

I have been trying to get a few sounds to play at the same time; currently i'm using a shared instance of SoundPool. I would like 1, 2 or 3 sounds to be played at the exact same time with no lag. ...
Sifuentes asked 3/12, 2010 at 4:32

0

I know this question asked multiple times in this platform but none of them are solving my issue. I was trying to play a sound file in a loop but when a loop is complete first time there is a notic...

2

Solved

The AudioManager class has a method abandonAudioFocus() and another method requestAudioFocus(). I wonder what is audio focus? And what happens if an AudioManager object gets the audio focus or lost...
Ephraimite asked 5/7, 2011 at 3:2

9

Solved

I have tried almost every method but I've failed to achieve gapless audio playback between looping a single track with a duration of 10-15 seconds. Steps I've tried and failed : Different audio ...
Teacake asked 9/10, 2014 at 8:51

4

Solved

I have this method in my main activity private void beep() { AudioManager manager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); manager.setStreamVolume(AudioManager.STREAM_NOTIFICATI...
Catkin asked 2/7, 2012 at 21:12

© 2022 - 2025 — McMap. All rights reserved.