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
Developer
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook
Accepted Solution

WebWorks for Playbook and using Camera API

Hi,

 

From the documentation of APIs i found that camera API can be used to invoke camera from an app. So, can this be used to capture an image which will then save the image taken into shared folder of playbook? If so how will i know the name of the file that is last added to camera folder in shared location? Please help me out with this.

 

Thanking you in advance,

Praveen

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: WebWorks for Playbook and using Camera API

Right now there isn't a way for you to find out which picture was just taken.  We have a takeAPicture() API that will allow for this in about a month or so..

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 12
Registered: ‎03-15-2011
My Device: Tourch OS 6.0

Re: WebWorks for Playbook and using Camera API

There is one way to get the picture that you take with the device. 

You should use the Phonegap framework http://www.phonegap.com/

They provide specific function wich allowe you to get the URI of the file or the data directly.

(But if you get the data directly there is a memory issue)

 

One other way is to code your own API in Java and add in the web works. (If you choose this solution and you success, I would be very interested in the result) 

 

Regards 

 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: WebWorks for Playbook and using Camera API


garciaf wrote:

There is one way to get the picture that you take with the device. 

You should use the Phonegap framework http://www.phonegap.com/

They provide specific function wich allowe you to get the URI of the file or the data directly.

(But if you get the data directly there is a memory issue)

 

One other way is to code your own API in Java and add in the web works. (If you choose this solution and you success, I would be very interested in the result) 

 

Regards 

 


Hi garciaf,

 

You are correct that PhoneGap has this API for smartphones, but they don't yet have support for Tablet OS.  And on Tablet OS you cannot create an extension using Java since there isn't a virtual machine on Java.  You would have to create an extension using ActionScript

 

The takePicture() API is getting even closer now for PlayBook and Smartphones.  You can see what the API signature will look like in the jsdocs found here:

https://github.com/blackberry/WebWorks-API-Docs/blob/delta/api/blackberry_media_camera.js

 

This will be the API signature used for both Tablet OS in the "Delta" release and in the Smartphone "Epsilon" release:

https://github.com/blackberry/WebWorks/wiki/Roadmap

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 12
Registered: ‎03-15-2011
My Device: Tourch OS 6.0

Re: WebWorks for Playbook and using Camera API

Sorry

You are right I just work  for the smart phone and not for the playbook device. 

By the way the Java Virtual Machine is plan for playbook ? 

 

Thanks 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: WebWorks for Playbook and using Camera API


garciaf wrote:

Sorry

You are right I just work  for the smart phone and not for the playbook device. 

By the way the Java Virtual Machine is plan for playbook ? 

 

Thanks 


RIM still hasn't announced timelines yet

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook

Re: WebWorks for Playbook and using Camera API

Hi,

 

May I know when this new API will be added to existing SDK? Or is it available to use now?

 

Thanks

Praveen Rajan

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: WebWorks for Playbook and using Camera API

It should be available in the first part of June
Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook

Re: WebWorks for Playbook and using Camera API

@Tim Neil

 

Thanks for the quick response.

Developer
Posts: 163
Registered: ‎05-06-2011
My Device: Playbook

Re: WebWorks for Playbook and using Camera API

@Tim Neil

 

Any updates on the Camera API module?

 

Thanks

Praveen