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: 44
Registered: ‎11-12-2012
My Device: BB 10 Dev Apha
My Carrier: -
Accepted Solution

PhoneGap Plugin development for BB10 (QNX)

Hi All,

I'm trying to play a bit with phonegap 2.5 just to understand how it works with BB10..apart from the basic steps, I still do not understand what I need to do in case I am required to create a custom plugin..,according to the documentation, it seems the reference language is Java, but as far as I know, native extensions for BB10 need to be developed in C++ and I strongly suspect Java is for older BB version (Torch,etc)

Even if I dig into the example project that is located inside the Phonegap zip archive, I cannot figure out how extensions can be made.

Can anyone help me on this?

Thanks a lot

 

-marco 

Retired
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: PhoneGap Plugin development for BB10 (QNX)

Hi,

 

We're working on alignment with cordova (the open source project behind PhoneGap). Expect more information on that to be posted soon.

 

In the meantime, you can build a WebWorks extension and add it to the www folder of your PhoneGap project. There is a template available to get your started here:

 

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10/Template

 

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Contributor
Posts: 44
Registered: ‎11-12-2012
My Device: BB 10 Dev Apha
My Carrier: -

Re: PhoneGap Plugin development for BB10 (QNX)

Hi Bryan,

thanks for your quick reply. In any case, once the alignment is done, I still expect to write extensions in C++..am I right?

As far as I understood, Cordova relies on Webworks which means I have to extend Webworks with the native SDK and JNext in case current APIs are not enough for my purposes. Is that correct?

Thanks again for your time and sorry for my trivial questions, but I cannot completely understand the mechanism behind the covers from the documentation and the code.

 

-marco

 

Retired
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: PhoneGap Plugin development for BB10 (QNX)

Hi Marco,

 

Yes, you are correct! Once we've aligned with cordova, you will still build native code in the same way but we will allow you to package it as a cordova plugin rather than WebWorks extension.

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Contributor
Posts: 44
Registered: ‎11-12-2012
My Device: BB 10 Dev Apha
My Carrier: -

Re: PhoneGap Plugin development for BB10 (QNX)

Hi Bryan,

thanks again. 

Looking forward to hearing news from your team!

-marco