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 an array of sounds and change the tempo using soundpool

I am trying to develop an application which plays one of the predefined arrays of sounds continuously and also change the the tempo,pitch (individually) etc using soundpool class of android. I know how to change the pitch of a sound. But I do not…
0
votes
1 answer

Unable to get audio list from content provider

I am building a music player and songs are being displayed multiple times in logcat. I want to display the songs in listview. Here is my main activity: public class MainActivity extends AppCompatActivity { List list=new ArrayList<>(); …
0
votes
0 answers

Get static time of accomplished method Android

Im working on music player for Android and I need to get static time to start playing music. Acutally command context.player.start() take random time from range <2;20> [ms] but I need to get static time of accomplishing method. My code is below. I…
Jo Dung
  • 162
  • 2
  • 18
0
votes
1 answer

Query previous ringer mode when RINGER_MODE_CHANGED received

Hello android developers I declared a broadcast receiver registered android.media.RINGER_MODE_CHANGED. That is working fine, it get called every ringer mode changed. The real problem is I need to know the ringer mode transition. I.e. I need to…
0
votes
0 answers

Seekbar's onProgreesChanged not working correctly when dragged to quickly

I've created a DJ program with a mediaplayer on each side of the screen(like in the picture below) The seekbar between those two whenever moved should increase volume of one mediaplayer and decrease the other mediaplayer's volume respectively. When…
0
votes
1 answer

Changing stream volume of ALARM STREAM when call is being handled

My app requires me to modify the volume of alarm stream when incoming call has been received, and voice transmission between two parties is going on. I used this code: …
SoulRayder
  • 5,072
  • 6
  • 47
  • 93
0
votes
1 answer

Can we set Android app’s volume as relative to device volume, without affecting the device volume?

My Android app plays audio, even when other music is being played by device or some other app. I want to take user input from SeekBar & set my app’s volume in background, as percentage to the current device music volume.I want to set my Android…
San
  • 1
  • 3
0
votes
0 answers

Switching off Alarm during call

How does the native call disable the alarm ringing and vibration when a call is ringing and vibrating? And after the call disconnection the alarm is resuming again in native behaviour. I tried…
Ajitha
  • 717
  • 1
  • 7
  • 30
0
votes
1 answer

Android setStreamVolume not working reliably

Since Android Marshmallow, AudioManager.setStreamVolume not working reliably. The Stream does not change its volume. Here is the syntax: audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, volume, AudioManager.FLAG_SHOW_UI); The UI that is…
0
votes
1 answer

Audio Manager onAudioFocusChange() not firing when notification arrives

I want to perform some action before a notification sound occurs. After some googling I found out that OnAudioFocusChangeListener is the way to go. I made my service implement AudioManager.OnAudioFocusChangeListener but the method…
varunkr
  • 5,364
  • 11
  • 50
  • 99
0
votes
1 answer

How to prevent MediaPlayer to start in other apps

I try to make simple mediaplayer app just for personal/educational purpose (play specific mp3 file) but i have a problem with others apps. I use services to play sound in background. Everything working fine but when i turn another media app i still…
pZCZ
  • 183
  • 2
  • 11
0
votes
1 answer

How can I increase number of audio streams for android?

I'm learning about android development. Let's say I want to be able to listen to spotify music in the background, while simultaneously listening to a spoken word podcast thru some other podcast app. Ive tried creating a Soundbuilder object and…
0
votes
0 answers

.isWiredHeadsetOn() repeat check?

I'm trying to create an application that will only let you in a another activity if you plug in your headphones. I got a code, that works, but the problem is that it's checking the headphone is plugged in or not when the activity starts only. I want…
Tin_Ram
  • 99
  • 1
  • 11
0
votes
2 answers

Android, how to route the audio to speakers when headphones inserted?

I am looking for a way to play audio from an Android device's speaker, even when headphones are inserted. In fact, the typical behavior is that, when headphones are inserted, no audio is outputted form the speakers. However some apps, such the…
user975176
  • 428
  • 5
  • 16
0
votes
0 answers

Play iHeartRadio url on Android?

I'm trying to play the following URL:http://wtkt-am.akacast.akamaistream.net/7/518/129345/v1/auth.akacast.akamaistream.net/wtkt-am using a standard MediaPlayer but it's not working. I opened the link in VLC and looked at the details and noticed that…