views:

69

answers:

2

Is there any way to access the device camera from Java on a blackberry?

My goal is to be able to take a photo and use it within the application.

+1  A: 

Take a look at the Invoke class. You can invoke the camera application as well as capture an image.

Serge
+1  A: 

With Invoke you have to wait for the user to take a picture. It starts the native camera app and pushes that screen on top of the stack.

Maybe this is fine, but if you want more control, look at the Camera Demo in the RIM samples, this has an example of using J2ME MMAPI classes: Player, VideoControl, etc... you can call the snapshot methods yourself instead of waiting for the user.

spacemanaki
Thanks, I will take a look at the the camera demo and see if I can use parts of it!
paullb
No problem! I've been working with this API recently, the Camera Demo is quite easy to follow.
spacemanaki