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
Contributor
ieeehh
Posts: 39
Registered: ‎09-02-2011
My Device: Curve 9300
My Carrier: Tigo

BB10 Testing camera

I'm building an app and I want to provide the user with the option of taking a picture and displaying it on a <img> element.

 

I'm using the documentation function takePicture() and suppose everything will be fine. But how do I test it??
In Ripple it simply says "blackberry.media.camera object is undefined." and in the Blackberry 10 Dev Alpha Simulator, nothing happens.

 

Fiddle here

 

How do I test my app?

Please use plain text.
BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800
My Carrier: Rogers

Re: BB10 Testing camera

your code is incorrect - here is an example

https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/camera/app

basically you can use
<input id="picture" type="file" accept="image/*" capture="camera" style="display:none;">
@nukulb
Please use plain text.
Contributor
ieeehh
Posts: 39
Registered: ‎09-02-2011
My Device: Curve 9300
My Carrier: Tigo

Re: BB10 Testing camera

Ok, thanks! I got it to work.

 

Since I don't have a BB device with me, in this example, when you take a picture, the file gets saved and THEN shown on screen? If so, how do I get the file path?

 

Thank you

Please use plain text.