Questions tagged [android-sound]

31 questions
1
vote
0 answers

Setting ringer stream to 0 causes do not disturb

I am building an app that needs to mess with the user's sound. It is all fun and games until I need to turn off the user's sound. I have the following piece of code: AudioManager am = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE); int…
1
vote
1 answer

Android: detect if sound from STREAM_VOICE_CALL is playing

I'm looking for a way to check if other applications are using the STREAM_VOICE_CALL (for example during a phone call or while listening a whatsapp voice note bringing the phone to the ear) (but in general we should find a way to choose any stream…
1
vote
0 answers

Android: How to manipulate the sound of the whole device?

I'm trying to create a small equalizer-app for my android device, so I need to manipulate the sound of the whole device. Is this possible ? Or do the users of my app need root? Can I manipulate the sound of specific applications only?
MeineHTMLCodes
  • 509
  • 5
  • 19
1
vote
2 answers

camera2 API shutter sound is different than built-in camera's and is inconsistent across different devices

I wrote some code to play the shuttersound for Android using the camera2 API. The code is: MediaActionSound mediaActionSound = new MediaActionSound(); mediaActionSound.play(MediaActionSound.SHUTTER_CLICK); I've tested on more than ten devices. The…
ikevin8me
  • 4,253
  • 5
  • 44
  • 84
1
vote
1 answer

Soundpool play several times android

I have Problem playing soundpool . I am new to education in Android and I hope you will help me. I created class to load soundpool public class Suond { protected static int suond1 ,suond2,suond3,suond4,suond5,suond6,suond7; protected …
1
vote
1 answer

Specific way to detect custom notification sounds in Android

I am currently offering a functionality for my app for which I display all the available system notification sounds to the user. Now I want to detect the custom notification sounds that may be there in internal memory as well as SD card. Currently I…
SoulRayder
  • 5,072
  • 6
  • 47
  • 93
1
vote
1 answer

Mute the sound “beep” by MediaRecorder start/stop Android 6

How to remove the sound "beep" when the video recording starts using MediaRecorder? To solve this problem I use the following method: private int[] audioStreams = new int[] { AudioManager.STREAM_ALARM, AudioManager.STREAM_DTMF,…
1
vote
0 answers

Measure the call sound quality using Discrete Fourier Transform

I need to measure the sound quality of calls made between two mobile devices. I found out two ways to implement it. Test it with a sine-wave at 100hz frequency increments between 300hz and 3.4khz. If there is a clean Signal-To-Noise ratio for…
Mustafa Mohammadi
  • 1,433
  • 1
  • 12
  • 25
1
vote
0 answers

stopping sound when animation resets

I have an activity with a simple animation (a ball moving from side to side of the screen) in the onAnimationRepeat(Animator animator) method, I play a short sound (1 sec. or less I think): sputnikLeft.start(); When the device changes orientation,…
vector
  • 7,334
  • 8
  • 52
  • 80
0
votes
0 answers

Android Sound Localization

Does anyone know how to do sound/media Localization in android like we do with strings translations to support different languages in the app? because i didn't find any good resources for this feature. EDIT - This is how i using the media resources…
0
votes
1 answer

Audio files is not running in the android studio , showing error

enter image description here here you can see the error is coming again ang again Pls help me, i am unable to run the application due to this. There is a problem with its format ,it is actually not recogonizing the .mp3 or .wav or any time of sound…
0
votes
1 answer

How to disable sound in back and recent touch android?

I need to know where exactly sound has been implemented in back and recent function. When I touch/click, home and recent icon has sound. I don't want to do in user application. I have aosp source code for Android 10. So I need to know in which…
0
votes
2 answers

Android studio Timer end Alarm sound playing problem with stop

I create a timer app and that code was play the alarm sound but how can I stop it? xD I use that code for playing: Uri ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM); Ringtone ringtoneSound =…
0
votes
1 answer

What is the problem with this code ?Why is not working ,it tellls me "Illegal Start of expression","expected ;" and it points me to (View V))

sound1= sounds.load(getApplicationContext(),R.raw.sound1,1); Here is a function that want to play a sound when the button is clicked. public void playsound1(View v ) { sounds.play(sound1,1.0f,1.0f,0,10f); } But i don't know why it does not…
0
votes
1 answer

Is there a limit to the sound file playback in Android?

I'm doing an application with audio files and photos.(dictionary-like) I want to play "A" sound for "A" photo. Sound is played when the button clicked(for to be simple).Application works smoothly BUT the sound does not play when the button clicked…
Mehmet
  • 3
  • 4