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

Can I store a sound file which is recorded by "MediaStore.Audio.Media.RECORD_SOUND_ACTION" in .wav format?

I am using following code to record the sound in my Galaxy S2. Intent intent = new Intent(MediaStore.Audio.Media.RECORD_SOUND_ACTION); But this code is storing it in .3ga file. In my app, I need to find the maximum amplitude of the sound. But Java…
shriguru nayak
  • 310
  • 1
  • 3
  • 21
0
votes
1 answer

In Android, how can I play mp3 through telephony and not allow to play through wired headset or bluetooth headset even if it is plugged in?

I would like to play a music media (e.g. mp3) file in a telephony way instead of speaker way. How can I do it? When a wired headset or bluetooth headset plugs in, I want to keep it playing through telephony still, i.e. just leave the plugged in…
0
votes
1 answer

How to add an audio file to an image in Android

I want to add an audio file to an image. So when someone gets that image he can extract the sound from it. I think we can add additional data to image header. But I don't know how to do that sort of header processing in Android. Can you please guide…
Optimus
  • 415
  • 4
  • 19
0
votes
2 answers

How to improve the audio quality on android

I am doing voice recording application on android using AudioRecorder Class and have worked with different Sample Rates 44100,32000,24000,16000 and 8000. The Sample Rate 44100 gives good quality audio but it takes very large size but other samples…
M.A.Murali
  • 9,988
  • 36
  • 105
  • 182
0
votes
2 answers

setRingerMode to normal not working

I have seen a lot of questions about ringer mode. Nothing seems to give me a clue on the problem I am facing. I have set ringer mode to the normal RING mode for a service that gets started in the foreground. Unfortunately that doesnt seem to change…
0
votes
0 answers

Android: SeekBar volume control in a AsyncTask

I know how to control sound volume with a seekbar: audioManager = (AudioManager)getSystemService(Context.AUDIO_SERVICE); int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); int curVolume =…
user1364684
  • 800
  • 2
  • 8
  • 28
0
votes
2 answers

Android setStreamVolume to ZERO doesn't work in Android 4

I noticed that under Android 4.x setting ring volume to 0 is not possible. If I execute this code and then I go to Settings--> Sound --> Volumes I can see it is set to 1. I audiomanager.setStreamVolume(AudioManager.STREAM_RING, 0, 0); Do you know…
Ton
  • 9,235
  • 15
  • 59
  • 103
0
votes
2 answers

Audio focus on my app when tv is running in google tv

I need my app to get the audio focus when tv is ruuing a channel and my app is launched and loose focus when it goes to background. I tried it but not working in google tv. I tried…
bharath gangupalli
  • 550
  • 1
  • 7
  • 23
0
votes
1 answer

Dynamically change incoming call ringtone

I am trying to dynamically replace my ringtone with a synthesized speech from text. But as soon as I get an incoming call my app seems to loose audio focus and I cannot change my ringtone dynamically. Is there a way to do this? Thanks ~Saurabh
0
votes
1 answer

muting one audio and playing other audio in its place (VideoView)

package z.x; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import android.app.Activity; import android.content.Context; import android.media.AudioManager; import…
nsp
  • 378
  • 1
  • 4
  • 19
0
votes
1 answer

Media player error:- when i decrease seek bar then volume is decreasing but on progress increase it is not increase volume in real state

i have a problem in my media player AudioManager. When i decrease volume of sound through seekbar i will decrease but when i do progress increase it is not increase sound volume in same state.. please help me to sort out my problem.. thanks in…
0
votes
2 answers

Media Player Error

This is my code for controlling two seekbars to set volume control in media player for two simultaneously playing sound. But the sound is turned on and off on the progress change of seekbar, it does not increase or decrease of volume frequently on…
0
votes
1 answer

setSpeakerphoneOn() not working on 2.1, working on 2.3

I need to play some audio through the earpiece. I am using AudioTrack to play some sound on a device. and the audio mode is set as STREAM_VOICE_CALL. Also, in my activity, the speakerphone is turned off by: AudioManager am; am =…
Alabhya
  • 490
  • 1
  • 9
  • 16
-1
votes
1 answer

AudioTrack and Google cast / Chrome cast

I am trying to enable Google Cast / Chromecast support to my audio app which decodes audio and writes the bytes to AudioTrack and play it. I know that using audio files, it is very simple as I can just provide the url for the file and it works; but…
frankish
  • 6,738
  • 9
  • 49
  • 100
-1
votes
1 answer

Disable internal and external speakers and allow only earphones to watch video or listen Audio

I have some videos of which audios sound should be available only through earphone, not from inbuilt speaker or external speakers. NOTE: It should not allow External Speakers with 3.5mm jack. What is the possibility to solve it? It will be great if…
1 2 3
52
53