Questions tagged as 'mediaplayer'

1
answer

how to access the ringtone per current with URI?

Hi, I'm doing a fake call app and I do not know how to use the default call tone that the phone has, I'm using uri to save the audio that the user of his music chooses, I just need the default tone prefs=getSharedPreferences("MisPreferencias",...
asked by 01.11.2018 / 04:38
1
answer

MediaPlayer does not work sometimes

The problem I have not located will therefore try to be as specific as possible because the compiler does not throw any errors and when it passes through the debugger test, either, but in some cell phones a very peculiar error occurs which I hav...
asked by 07.11.2018 / 04:09
1
answer

Remove variables from an android service

Hello stackoverflow community I'm doing an app that plays streaming audio as a service in the background, what I want to do is remove variables from the service from the Activity as well to update the play / pause buttons This is my service code...
asked by 08.05.2018 / 03:02
1
answer

MediaPlayer does not play in CountDownTimer

I have a CountDownTimer as follows: cuentaAtras = new CountDownTimer(mili, 1000) { public void onTick(long millisUntilFinished) { long seconds = millisUntilFinished / 1000; if (seconds <...
asked by 15.08.2017 / 11:12
1
answer

Android MediaPlayer with Service, implement Pause

Goodbye everyone and thanks in advance, I'm creating a simple player in Android Studio that basically has three buttons, pause, play, stop. To be heard on the background I call the class MediaPlayer from a Service . Running and clos...
asked by 27.02.2018 / 13:31
0
answers

Only plays a limited amount of sounds

I have created an application with 31 imageButtons, (the idea is to carry many more), each one being ButtonClicked, plays a different sound each button. Everything works apparently well, but, when it plays between 14 and 28 sounds, it stops r...
asked by 12.08.2018 / 04:39
0
answers

Get total time of a video with the EmbeddedMediaPlayer interface

I am making an audio and video player, it turns out that I need to know the total time of the video. I tried using the length () method and I can not get the result, if someone could help me I would appreciate it. Here is the link of the API api...
asked by 21.07.2018 / 02:22
0
answers

Mute MediaPlayer 'ONLY' when a call comes in

I have an Activity that allows me to play and stop a MediaPlayer object, as it appears in the code, for me it is convenient that when the activity goes to the background or pause allows the MediaPlayer to continue playing (as it happens with the...
asked by 27.04.2018 / 21:29
0
answers

how do I create a listener for incoming calls?

I have an activity that uses the middle class MediaPlayer, and I need to keep listening in the background, but when a cell phone call comes to a halt ... I already tried to overwrite the method onPause (), onResume (), but whenever I went to...
asked by 26.04.2018 / 22:30
1
answer

Stop Audio in fragment when changing fragment with ViewPager

I have an activity called EstacionesF, where with has a ViewPager. in the ViewPager there are 12 fragments and in each fragment it contains audio, when I execute the play button and change to the next fragment, it is still heard, it only stops p...
asked by 20.08.2017 / 17:40