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
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900

Problem in closing the Player

Hi

I have to play an audio or video through the url.

The audio as well as video is playing. But the problem is , when it takes time to load the url and i press the back button in between and open some other page then after some time the audio/video gets play while i am on the other page.

 

But on pressing back buttoni  am closing the player as well as closing he screen also.

So i want when i press the back button the url gets stop processing.

 

Please use plain text.
Developer
robert30
Posts: 191
Registered: ‎04-02-2013
My Device: BlackBerry Bold 9900

Re: Problem in closing the Player

Any reply please??

Please use plain text.
Developer
rishikeshsinghpbh
Posts: 121
Registered: ‎05-31-2012
My Device: 9900

Re: Problem in closing the Player

Robert,

I think, player is not closing properly.

Debug your code to check if you get any Exception while closing the player.

 

try {
                player.stop();

}catch (Exception ex) {

                System.out.println("Exception: " + ex.toString());
  }

Rishikesh Singh
Please use plain text.
Developer
Rishabh_Jain
Posts: 123
Registered: ‎07-11-2011
My Device: 8900

Re: Problem in closing the Player

On back key press, can check for following piece of code.

 if (_player != null)
                {
                 
                     _player.close();
                     _player = null;
                }

 

Please use plain text.