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
Highlighted
New Developer
Posts: 12
Registered: ‎01-16-2009
My Device: Not Specified
Accepted Solution

Keeping backlight on when playing video with VideoControl not working with OS 4.7 Tour

 I am developing an app that plays video using the VideoControl, like this:

 

player_ = Manager.createPlayer(url); player_.realize(); VideoControl_ = (VideoControl) player_.getControl("VideoControl"); videoControl_.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE,

"net.rim.device.api.ui.Field"); videoControl_.setVisible(true); player_.start();

 

The length of the video is longer than 2 minutes. On a OS 4.6 device such as the Curve, the video plays without the screen going black.

 

However, on the OS 4.7 Tour, the screen goes black even if I try to enable the backlight on regularly, like this:

 

 

final Timer t = new Timer(); TimerTask tt = new TimerTask() { public void run(){ Backlight.enable(true, 240); } }; t.scheduleAtFixedRate( tt, 0, 240000 );

 

The built-in Media Player app can play the same video without screen going dark.

 

How can I keep the screen from going black on a OS 4.7 device when playing video using VideoControl ? 

 

Thanks.

 

 

 

 

 



    

New Developer
Posts: 12
Registered: ‎01-16-2009
My Device: Not Specified

Re: Keeping backlight on when playing video with VideoControl not working with OS 4.7 Tour

Working now with this change:

 

t.scheduleAtFixedRate(  tt, 0, 24 * 1000 );