Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
mooret
Posts: 18
Registered: ‎03-11-2009
My Device: 9530 Simulator 2.11.0.86
Accepted Solution

Handling phone interruptions

I am using the Player to play never ending sounds but when a phone call comes through it stops playing the media player.

 

What is the proper way to listen for a system audio interruption?  I suppose when the application comes back into focus I can check if the media player had stopped?  Just looking for the all around best method for audio interruptions so that I can restart the player.


 

Thanks!

Please use plain text.
Developer
mooret
Posts: 18
Registered: ‎03-11-2009
My Device: 9530 Simulator 2.11.0.86

Re: Handling phone interruptions

Figure it out, just have to handle the DEVICE_AVAILABLE player status update.
Please use plain text.
New Developer
MattW
Posts: 7
Registered: ‎08-15-2009
My Device: Not Specified

Re: Handling phone interruptions

If you check out the PhoneApiDemo sample, there is an implementation of a class using AbstractPhoneListener and there are two methods, callConnected and callDisconnected.  I think that this may help, so you can see when to pause yourself and clean up some memory and when to start playing again.

 

Hope this helps :smileyhappy: 

Please use plain text.
New Contributor
gvenugopal141
Posts: 3
Registered: ‎01-04-2011
My Device: Not Specified

Re: Handling phone interruptions

 

I am also having the same problem. can you please answer to this http://supportforums.blackberry.com/t5/Java-Development/how-to-handle-phone-call-interruption-while-...

 

Thanks

venu

Please use plain text.