If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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

Web and WebWorks Development

Reply
New Contributor
markdclark
Posts: 3
Registered: ‎02-17-2010
My Device: none
My Carrier: none

Camera control

Can the camera be controlled (picture or video capture) by using the web based approach?  Once that is done I then need to forward that on to a server.  Can both of these tasks be accomplished by using the web method?

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Camera control

Hi There,

 

From a BlackBerry Widget you can launch the camera application using the Invoke JavaScript API.  After the user has taken a picture you can then upload it to your web server using a standard mult-part file upload form submit.

 

Right now you will have to search for the picture they have taken using the file IO JavaScript API to then upload it.

 

Widget JavaScript APIs can be found here:

http://www.blackberry.com/developers/docs/widgetapi/

 

We are working on a more simple "takeAPicture()" function that would just return you the file path of the picture they took, but it is not completed yet.

 

Alternatively you could wrap the Java camera APIs and use them in your widget.  A lab showing how to wrap a Java API for your widget can be found here:

http://na.blackberry.com/eng/developers/devbetasoftware/Lab_Widget_Extension.zip

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
misterza
Posts: 19
Registered: ‎06-28-2010
My Device: n/a
My Carrier: n/a

Re: Camera control

Has this new "We are working on a more simple "takeAPicture()" function that would just return you the file path of the picture they took, but it is not completed yet." been implemented yet?

Please use plain text.