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
anandr37
Posts: 19
Registered: ‎03-11-2012
My Device: Pearl 3G

Can WebWorks support native C calls in Playbook

Hi,

 

Is it possible to call native C code using WebWorks ?, or some way to

expose native C for webworks based application.

 

If so please let me know if there is an online tutorial for the same.

Please use plain text.
Developer
taylortbb
Posts: 137
Registered: ‎10-26-2010
My Device: Bold 9900 + PlayBook

Re: Can WebWorks support native C calls in Playbook

I don't know of a tutorial but it is possible. You can extend WebWorks with an AIR extension, and you can then extend AIR with a native extension. So any call to your native code will have to go through AIR.
--------
Taylor Byrnes
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 822
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: Can WebWorks support native C calls in Playbook

That's correct. You can use Adam Stanley's template to create a WebWorks Extension in AIR: https://github.com/astanley/WebWorks-Community-APIs/tree/master/Tablet/TEMPLATE

 

Then use the AIR Native Extension sample in the NDK to get started with your AIR Native extension: http://developer.blackberry.com/native/download

 

There is a sample app in the project wizard.

Tim Windsor
Application Development Advisor II
Please use plain text.
Regular Contributor
tububerry
Posts: 51
Registered: ‎05-25-2012
My Device: Bold 9930

Re: Can WebWorks support native C calls in Playbook

I have a similar question.

 

Can we call Blackberry SDK APIs from WebWorks.

I want to develop a scanner app using webworks, It is possible with webworks?

 

Thanks in advance.

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 822
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: Can WebWorks support native C calls in Playbook

BlackBerry WebWorks is intended for that very reason - so that you can develop in HTML5, but call into the native platform. You may want to review the overview here:

https://developer.blackberry.com/html5/documentation/ww_getting_started/What_Is_A_WebWorks_App_18454...

 

For barcode scanning, there is a community created extension for that:

https://github.com/timwindsor/WebWorks-Community-APIs/tree/master/Smartphone/Barcode

Tim Windsor
Application Development Advisor II
Please use plain text.
Regular Contributor
tububerry
Posts: 51
Registered: ‎05-25-2012
My Device: Bold 9930

Re: Can WebWorks support native C calls in Playbook

Hi Tim, That was useful.

I have created helloWorld app successfully.

How can i import & start building in eclipse  instead of regular notepad application. 

 

Thanks,

Divya

 

 

 

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 822
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: Can WebWorks support native C calls in Playbook

You can create a basic Project in Eclipse - or use one of the more specific project types. Really it's up to you how you want to develop it.

 

There are many other options as well - see this thread: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-develope-webworks-on-BB10...

Tim Windsor
Application Development Advisor II
Please use plain text.