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 sound in inner speaker

I am working on calling application, i want to play sound in caller device in inner speaker. Here is my code, mMediaPlayer.setAudioStreamType(AudioManager.STREAM_VOICE_CALL); audioManager.setMode(AudioManager.MODE_IN_CALL); …
Krunal Shah
  • 1,438
  • 1
  • 17
  • 29
0
votes
0 answers

How to mute audio thread of another application or change max volume of another application?

Please, help me solve the next issue - How can I get access to audio playback of another application(s)? It is possible situation when two apps are playing audio content, e.g. some game and radio app. How to get access to stream of one of them to…
0
votes
1 answer

android: do something after playing audio file

i try to stream and play an audio file in my application. i use this code : MediaPlayer player = new MediaPlayer(); player.setAudioStreamType(AudioManager.STREAM_MUSIC); player.setDataSource(url); player.prepare(); player.start(); i want to know…
mahdi
  • 16,257
  • 15
  • 52
  • 73
0
votes
1 answer

Android Turn on and off Sound App

I'm developing a game. I need a button to turn on and off game sounds. In my app, I play background music which I want to be muted upon clicking a button. Here's my code: AudioManager aManager = (AudioManager)getSystemService(AUDIO_SERVICE); if…
user3240604
  • 407
  • 1
  • 8
  • 22
0
votes
1 answer

Android, Allow user to select audio profile and save that choice for later use

The tutorials I see is allowing user to activate audio/sound profile by clicking the button immediately, i dont want to active selected profile immediately, i want to save user's choice for sound profile and activate that choice later with respect…
sarah
  • 5
  • 5
0
votes
1 answer

(Android) Overlay one audio to another audio

suppose that I have a audio file(10s), and I also have another one(2s). What I want is to overlay the second one to the first one, for example: first file(10s): 1111111111 (where "1" stands for 1sec), Second file(2s): 22. If I want to overlay the…
Huang Liang-Syun
  • 129
  • 1
  • 3
  • 10
0
votes
1 answer

Why is AudioManager leaking?

i`m facing this memory leak after closing my activity by pressing back-button: Since i couldnt figure out what it is, i outcommented almost my whole code to: protected void onCreate(Bundle savedInstanceState) { …
treesoft
  • 295
  • 2
  • 14
0
votes
2 answers

How to set speaker phone off when the app is killed by the "Recent App drawer"

I implemented an app which has a button speaker, which is manually set "on" by myAudioManager.setSpeakerphoneOn(true) and "off" vice-versa. But the bug is when you close the application while the speaker is on, it forgets the speaker was on. The…
lijo050
  • 233
  • 4
  • 14
0
votes
1 answer

Read out Alarm volume

I try to read out the Alarm volume the following way, but I always get wrong values. The ringer volume is always correct!! That happens on every Smartphone, HTC, Samsung, Sony and even on the virtual device. What could be the problem? private…
user1390816
  • 623
  • 2
  • 13
  • 34
0
votes
1 answer

What is the order of data returned with android audioRecord.read?

When using audioRecord.read in android, will the first short/byte([0]) in the given array be the latest audio sample, or the oldest one?
0
votes
1 answer

Asus fonepad7, Android Audiomanager can't use setMode()

I'm trying to set the speaker on automatically during a phone call on my asus fonepad7 but the it seems that I'm not allowed to dot it. I'm using the code below. audioManager =…
IvannMG
  • 41
  • 4
0
votes
1 answer

Android handler-decraese volume every 10 second

I want to create a button which when clicked turns the volume down one per 10 seconds. How should i fix it? please help Here is my code: public class MainActivity extends Activity { public AudioManager myAudioManager; final Handler handler = new…
sam flyn
  • 37
  • 6
0
votes
0 answers

Switching between musical app and non-musical app?

I am developing the music application . My Problem is that when i play the music from my app other music player songs are pause but when I play other music player songs when my player songs are play that time both player songs are mixed . My music…
0
votes
1 answer

Android mute/umute not working properly on asus device

I am using AudioManager to mute unmute on Asus memopad 10. I can mute the device but i can't unmute it back. If i use some other application which uses microphone it also doesn't work there. Then i have to restart the device than it start working.…
umerk44
  • 2,797
  • 4
  • 23
  • 43
0
votes
0 answers

Android - Restore notification sound back to original status after changed - java code

I have an application that run sound notification from broadcast receiver every specific period and the user can adjust the sound level by selecting the level of notification sound from preference, and after the media file finish running i use a…