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
Highlighted
Contributor
Posts: 21
Registered: ‎12-03-2010
My Device: Blackberry Bold 9700

Getting picture file path using blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args)

Hi,

 

With be code below I can access to the built-in camera, but when the user takes the photo it doesn't return the image path.

 

<script type="text/javascript">

var args = new blackberry.invoke.CameraArguments();
args.view = 1; // Video Recorder

blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args); // Video Recorder Application
</script>

Is there any javascript extension to take the picture and return the path of the save picture?

 

Best regards,

Daniel Botelho

Developer
Posts: 124
Registered: ‎09-06-2010
My Device: Not Specified

Re: Getting picture file path using blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args)

PhoneGap.

 

https://github.com/phonegap/phonegap-blackberry-widget/blob/master/framework/ext/src/com/phonegap/ca...

 

You can retrieve just the file path or the base64 encoded image.  Beware though, the image is rotated 90 CCW in HTML.  There is an open bug in issue tracker that is pretty much inactive.

 

Also, any picture over about 1.7MB in size will not work with base64.  The encoded image is just too big.  The cameras on today's phones are just too good.  On my Torch, I had to set Camera options to medium resolution to get it to work.

Regular Visitor
Posts: 1
Registered: ‎01-27-2011
My Device: Not Specified

Re: Getting picture file path using blackberry.invoke.invoke(blackberry.invoke.APP_CAMERA, args)

hi,

    Have you got solution for your question.. I am looking for the same..

 

Thanks and regards,

Shan.