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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
dkonigs
Posts: 202
Registered: ‎07-25-2008

VideoControl.getSnapshot() returns null on OS 7.0

So I'm working with some code that creates a video player, waits for it to initialize and start, then calls VideoControl.getSnapshot(null) to create an RGB565 preview image for the video.

 

On OS 6.0 and below, this code works fine, returning a byte[] with the image data.

However, on OS 7.0, this call returns null.

 

Are there any new gotchas or bugs/changes in OS 7.0 I should be aware of?

(I've seen this issue on both a real Bold 9900 device and in the 9900 simulator.)

 

P.S. I get the same results, regardless of whether I call getSnapshot() from a background thread or the UI thread.  It also doesn't make a difference whether I pass null or "encoding=rgb565" as the argument.  It also doesn't make a difference if try the new AdvancedVideoControl/USE_DIRECT_VIDEO method.

Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,837
Registered: ‎10-16-2009
My Carrier: Bell

Re: VideoControl.getSnapshot() returns null on OS 7.0

I've tested using the Snapshot KB on an OS 7 device and it works as expected:

http://supportforums.blackberry.com/t5/Java-Development/Take-a-snapshot-using-the-built-in-camera-of...

 

Could you please try the above sample?

 

If you continue to experience difficulties then please respond with the snippet of code being used to take the picture and the OS version of the device being tested to reproduce (Options > Device > About Device Versions).

 

Regards,

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.