problem with audio....

All your problems with Audio, Video and Images.

problem with audio....

Postby paul78 » Mon Sep 12, 2011 9:22 am

hello everybody!!!!!

i'm italian boy and i hope you can understand my problems...... :P

i'm creating one mp3player...it's all ok!!! but wen calling me or i calling another people the song is active!!!!

i want "pause" or "stop" the song wen i doing one call!!!!

how to do??????
paul78
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Sep 12, 2011 9:17 am

Top

Re: problem with audio....

Postby dlaroche » Sat Sep 24, 2011 4:45 pm

Hey,

Inside your Activity that is playing the sound make sure that you have the following code:

@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
MP.pause();
}

This will pause the media player for you, but then you will need to enable it again when the Activity receives focus again. So you will also need this code in the same Activity........

@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
MP.start();
}

That should take care of the problem for you. Let me know how it goes!

-Dustin-
dlaroche
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri Sep 16, 2011 6:34 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Exabot [Bot] and 16 guests