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
New Contributor
Posts: 6
Registered: ‎06-08-2013
My Device: Z10

Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

I am using Phonegap to develop my BB10 app. I am using childbrowser to do twitter oauth and am having trouble with attaching events to detect the URL change to capture the access token. Per the documentation for phonegap here: http://docs.phonegap.com/en/2.7.0/cordova_inappbrowser_inappbrowser.md.html#addEventListener adding event listeners to the childbrowser are not supported on BB10. 

 

So, my dilemma is that I cannot use this script either: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/Twitter-OAuth-1 as it relies on the native BB10 webworks childbrowser kicking in to load the authorize urls for oauth. I am unable to access the childbrowser.window property as it is undefined.

 

Has anyone else run into this issue. I am not sure how to proceed.

Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

The Cordova/Phonegap implementation for BB10 is still a work in progress

 

You don't actually need it as WebWorks is way more advanced

 

Have yuo thought about simply re-coding it directly for WebWorks?

 

It's fairly simple to do such things

 

Personally I start with WebWorks then deploy to other targets as it's easier that way

 

Taking a WebWorks project and making it iOS / Android is stupidly easy




Click the like button if you find my posts useful!
New Contributor
Posts: 6
Registered: ‎06-08-2013
My Device: Z10

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

My app is actually a Sencha Touch app which is packaged in Phonegap to run on both Android and iOS. I am now porting it to BB10 and thus I do not have the opportunity to re-code it directly in Webworks.

Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

I apologise then

 

Sencha is one of the few frameworks I don't play with

 

What Cordova-specific stuff are you using?

 

I can probably back-port it if you PM me - strip out the Cordova and throw in WebWorks

 

I need to know, specifically, which bits of Cordova you're using - if just browser (easy)

 

The project remains yours - I just fix stuff :smileyhappy:




Click the like button if you find my posts useful!
BlackBerry Development Advisor
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

Hi,

 

I would suggest upgrading to 2.8.0 if possible. The BB10 implementation has been refreshed and the native child browser is now exposed.

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
New Contributor
Posts: 6
Registered: ‎06-08-2013
My Device: Z10

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

For Phonegap 2.8.0 there are two choices: 

 

1. Blackberry

2. Blackberry 10

 

Option 2, BB10 requires me to download the native SDK? Is this the one that I should be using? I have been using option 1 so far where I start out by copying the example folder for the webworks project.

BlackBerry Development Advisor
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

You'll want to use the "blackberry10" sub folder (option 2).

 

The new implementation does not rely on WebWorks - essentially it includes WebWorks, minus the native packaging and deployment tools.

 

Installing the NDK will give you those tools, but if you already have WebWorks installed you can get up and running by adding the "dependencies\tools\bin" folder to your path. You will also need to install node js.

 

http://cordova.apache.org/docs/en/2.8.0/guide_getting-started_blackberry10_index.md.html

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

Interesting fact

 

Cordova 2.8.0 includes Mac OSX support

 

Its pretty basic right now - we used the pre-release for testing

 

As long as you are minimal on platform specifics you can now open up a new market

 

Just a FYI




Click the like button if you find my posts useful!
New Contributor
Posts: 6
Registered: ‎06-08-2013
My Device: Z10

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

Thanks bryanhiggins. I am going to try upgrading to Phonegap 2.8 and setup the NDK and see If I can get the childBrowser issues resolved. I will report back if I have any success.

Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C

Re: Phonegap childbrowser plugin taking over the native BB10 webworks childbrowser

PG 2.8 looks good but is still now fully integrated into WW

 

The aim BB have at the end is that PG becomes a base with WW adding extra stuff

 

Are you ONLY trying to child a broswer or are there other PG features you are using?




Click the like button if you find my posts useful!