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
New Developer
yuzman
Posts: 8
Registered: ‎09-18-2009
My Device: Not Specified

Blackberry Camera (SnapShot) Problem - 8320 Simulator

Hello guys. In my application I try to take a snapshot (photo) from the internal camera of the device. I've read the article about "How to take a snapshot using the built in  camerahttp://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1089414/How_To...  (can be found here) but the problem is ViewFinder doesn't work. My laptop has a webcam so when I start the camera from the simulator's applications webcam starts. On the other hand my application doesn't even start the web cam. I've read the other threads about the problem on the 8900 curve which needed to remove all the fields on the screen to be able to see the viewfinder, thus I removed all the fields but the viewfinder's screen.. Here's the basic code so that you can have an idea. I didn't include the snapshot method, since I can't even start the viewfinder.

 

<note that I'm using a 8320 simulator with eclipse> 

 

public class CameraScreen extends MainScreen

{

private VideoControl vc;

private String encoding;

private Player player;

private Field viewFinder;

 

public CameraScreen()

{

try{

player = Manager.createPlayer("capture://video");

player.realize();

 

player.start();

 

vc = (VideoControl) player.getControl("VideoControl");

viewFinder = (Field)vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");

this.add(viewFinder);

 

 

}catch(Exception err)

{

 

}

 

}

 

when I push this screen from a new UiApplication it should start the webcam eh ? 

 

Any  help will be extremely appreciated. Thanks already...

Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry Camera (SnapShot) Problem - 8320 Simulator

You have missed a key line in the KB article:

 

"BlackBerry® Device Software 4.6"

 

As far as I am aware, the highest level software available with an 8320 is 4.5, so this method of invoking the camera is not available.

 

The best you can do with this level of OS is detect when a photo has been taken by having a File Journal Listener.

 

Sorry.

Please use plain text.
New Developer
yuzman
Posts: 8
Registered: ‎09-18-2009
My Device: Not Specified

Re: Blackberry Camera (SnapShot) Problem - 8320 Simulator

Thanks for the fast reply, I'll mark this as the solution. Is there anyway to update the os for this particular device from 4.5 to 4.6 ?
Please use plain text.
Developer
peter_strange
Posts: 19,599
Registered: ‎07-14-2008
My Device: Not Specified

Re: Blackberry Camera (SnapShot) Problem - 8320 Simulator

Not at the moment.

 

Here is the best URL to keep an eye on these sorts of things.

http://www.blackberryforums.com/rim-software/110673-useful-latest-os-all-models.html

 

Having said that, I have seen nothing that indicates that any device that was released pre 4.5 will be upgraded to anything post 4.5.  So if I was a betting man, I would place a bet on the fact that you will not get a suitable upgrade for your device.  But that is not official!

 

Sorry again.....

Please use plain text.