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
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

BB10 + Cordova/Phonegap support

Hi there,

 

is it possible to use cordovas/phonegaps ant build-script to deploy application to sim/dev alpha device?

 

For now I can package and deploy an test-app directly to the BB10 dev alpha using the ant script for PlayBook linking to the WebWorks PlayBook OS SDK, but the new API are missing then on the device like "blackberry.event".

 

Since the ant script is doing all the stuff from packing to signing and also deploying it would be really nice to have that solution for BB10 also. I tried to work with ripple, but it seems to be more beta then expected and is throwing only errors to the screen.

 

Regards

LBP


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 + Cordova/Phonegap support

You are correct, currently you can use the Cordova for Tablet OS SDK to package an application that will run on the PlayBook and Dev Alpha devices.

 

The Cordova for BB10 SDK has not yet been created.  I believe they are waiting on the WebWorks SDK for BB10 code to stabilize further (currently BETA code) before completing this project.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 + Cordova/Phonegap support

Hi Adam,

 

thx for your reply. I tried to package an app with BB10 SDK using debug token and it seems to work, but then it packages a chrome-folder to my content witin the .bar file and is loading the content from within that folder, not the files I wanted to be loaded as my project. I tried console and ripple packaging and both is really alpha at this time I think.

 

Hopefully the BB10 SDK will going forward very well to get in touch with it, since there are a few new WebWorks APIs in the docs I really want to give a try!!

 

Regards

LBP


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
New Contributor
iamjake648
Posts: 5
Registered: ‎07-14-2012
My Device: Torch 9810
My Carrier: 7158646904

Re: BB10 + Cordova/Phonegap support

I was using the Tablet SDK and the playbook build command to build for the dev alpha. 

Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 + Cordova/Phonegap support

Hi iamjake648,

 

I also build it with PlayBook SDK since BB10 SDK is throwing errors all the time. But this way the new APIs commands are not available. Hopefully we get an update for BB10 dev alpha and BB10 SDK working well for all the things we want to in the near future.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 + Cordova/Phonegap support

>>but then it packages a chrome-folder to my content witin the .bar file

 

Is this folder a subfolder within your application project?  If so, Ripple includes everything it finds in this folder as its "Project Root".

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 + Cordova/Phonegap support

Hi

 

the "chrome" folder isn't part of my app and also the it isn't the content of the "chrome" folder linked in the config.xml to be loaded, so I do not understand what is going on here using the BB10 SDK.

 

In the meantime I packaged all my testimonials with latest PlayBook SDK using Phonegap/Cordova ant build script and this is working well, but not working with BB10 SDK until now.

 

IMO there are "too many" ways to package, sign and distribute an app and I think ant build script is the best solution I have seen while developing with BB SDK's so far. I only need one line in console and all things are done. Hope RIM comes up with something quite similar in the future to make things easier. All the time investigating to get it packaged, signed and distrubuted to the devices/simulators should be time we can better use for development and improvement of apps for BB platforms.

 

Regards.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BB10 + Cordova/Phonegap support

Ah!  I see what you mean now, I had forgotten about the "chrome" folder. 

 

This is a folder that is added to the BAR file by the packaging process.  It contains framework pieces used by your app, including a file named index.html.  The contents of that file are something like "The man behind the curtain" (or something like that).

 

If that is the content you are seeing, I would check your config.xml file to make sure the <content> element is referencing the correct filename.  I'm curious if its pointing to a local file that doesn't exist, it may be searching through the BAR for a default file, and finding that index.html file.  If that is the case, I'd actually like to file a bug against the framework as this is confusing behavior for a developer.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
Developer
LBP
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: BB10 + Cordova/Phonegap support

After Updating the BB10 Dev Alpha to the latest OS version 10.0.6.386 (for now), I also reinstalled the latest WebWorks SDK 1.0.1.5 and also changed some lines of the XML-files of my Cordova test app to get it somehow working together using only an ant-call like "ant bb10 load-device" to package, create a .bar file together with Debug-Token and distribute the app to the device. Right now it seems to work well for this situation and for me is the best solution to get an app packaged and distributed to a device for testing since you only need to call one line in the command-line for Windows.

 

Next thing would be to have Phonegap/Cordova support and a fix for the signing process, since it seems to not work for me like for the PlayBook SDK. It always fails and seems to be an issue of the parameters and values of the signing-key and so on. Hopefully this will be fixed or someone can provide better informations since it seems to not work (hopefully not only for me?!?!).


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Please use plain text.
Trusted Contributor
usr501
Posts: 222
Registered: ‎03-03-2012
My Device: Ripple, LE Z10, Dev Alpha _C, Playbook, Bold 9900
My Carrier: rogers

Re: BB10 + Cordova/Phonegap support

Yes my sentiments. I have Ant/phonegap/jqueryMobile working very well with SDK for tablets  2.2.05 and SDK 2.3.1.5 for smartphones.

No luck with  to date with Ripple  for BB10 - code signing errors etc.

 

Please use plain text.