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

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Contributor
Posts: 17
Registered: ‎07-12-2012
My Device: BB10 Alpha Device
My Carrier: none

mmr volume change on email notification

Hi,

 

I'm using mmr to playback an mp3 file in my game, I had the game running and the screen locked before going to bed to check if I fixed a battery issue.  When the game loses focus, it simply sets music volume to 0.  Unfortunately, at 3am, I got an e-mail and noticed this issue.  The problem is, receiving an e-mail played the sound effect and vibrated the phone, but it also triggered the volume of my music to be something other than zero.  Touching the volume buttons(up or down) immediately silenced the music again and everything was back to normal.

 

Any idea why this would happen? Just in case it's relevant, I'm running 10.0.9.348.

 

Thanks,

Jimmy

Retired
Posts: 29
Registered: ‎03-19-2012
My Device: Z10
My Carrier: BELL

Re: mmr volume change on email notification

Thanks for posting!

 

I tested out a very similar sample and was not able to preproduce this issue on 10.0.10 and I was not able to reproduce this. Please let us know if you still have this issue.

 

Cheers, Ram

 

 

Contributor
Posts: 17
Registered: ‎07-12-2012
My Device: BB10 Alpha Device
My Carrier: none

Re: mmr volume change on email notification

Thanks for trying to repro the case, I still haven't been able to upgrade to the latest OS, so that might be the difference.  A simpler repro case i found is: in code, set the music volume to 0 then take a screenshot, that kicks the music back in(at the current system volume).

 

I fixed my previous issue by stopping the music when focus is lost and restarting it afterwards.  I didn't go the extra mile and continue the music where it left off, I'll do that in the future.  I'll also change it in the future to stop/start when I set the volume to zero/non-zero to avoid both the "screenshot" and "incoming email" issue(likely any system sound effect) while the app is running.

 

Jimmy

Retired
Posts: 29
Registered: ‎03-19-2012
My Device: Z10
My Carrier: BELL

Re: mmr volume change on email notification

I just tried the screenshot too but I cant seem to reproduce the game music kicking in. I suppose it is fixed then Smiley Happy

 

And yes! yes! the best practice we recommend would be to listen to the app lifecycle events and to put your music on a pause accordingly.

 

Cheers, Ram