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
Posts: 37
Registered: ‎05-30-2009
My Device: Not Specified

System Media Player gets interrupted when another player plays

Hi Everyone:

 

I have a fitness app which uses the Player object to generate some short sound effects. Users of my app also listen to music using the built in media player on the  device. The problem is that when my app generates the sound effects, it cuts out the music. It does not appear that the build in media player has any sort of control api or am I missing something?

 

I would hate to have to recreate the media player functionality in my app just so that I can pause it temporarily. Is this the only way around this? I would be happy with a "pause" and "resume" or with both players simultaneously playing. Can anyone give some guidance.

 

Thanks

BTW: This is on OS4.5

 

 

 

 

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: System Media Player gets interrupted when another player plays

it seems that players cannot run simultaneously. a workaround was to start them both in the same thread at the same time. just read about this stuff, though.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Highlighted
Developer
Posts: 37
Registered: ‎05-30-2009
My Device: Not Specified

Re: System Media Player gets interrupted when another player plays

I'm bumping this thread to see if there are any more suggestions out there. This seems to be an issue with CDMA devices according to this article:

 

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/Suppor...

 

The resolution states: "You can program your application to register a PlayerListener to monitor playback. When another Player supersedes playback, a Stop event will be received."

 

I'm not fully understanding this. In my case the media player (or other third party music plalyer) has already been started before the user launches my app. The issue is that when my app plays a sound, it pauses any other player running. I have no way to start those players up programmatically again. This is really casuing the users of my app a lot of grief as they have to manually restart their music.

 

Again, any help is appreciated.