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
Developer
Posts: 1,158
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido
Accepted Solution

Android/iOS apps with WebWorks?

A longtime Blackberry native app developer, I'm making the jump into cross platform with HTML5/CSS/JavaScript. Since WebWorks is basically Blackberry's implementation of Cordova, as long as I didn't use Blackberry-specific plugins I thought I'd be able to use Webworks to build for Android and iOS in addition to Blackberry 10. Unfortunately I'm having trouble adding Android to WebWorks as a target platform. Now I'm wondering if WebWorks is capable of building for non-Blackberry platforms or it is is locked down.

 

Can anyone tell me if I have to go back to Cordova or how to add the Android platform to WebWorks if it is supposed to be possible?

 

Thanks.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Retired
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: Android/iOS apps with WebWorks?

Hi,

 

Yes, it's possible to add android/ios or any other platform supported by Cordova to your WebWorks app.

 

From the command prompt type:

 

webworks platform add android

 Then use this command to deploy to the android device:

 

webworks run android

 

The com.blackberry APIs and the WebWorks GUI don't support platforms other than BlackBerry 10.

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Developer
Posts: 1,158
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Android/iOS apps with WebWorks?

Thanks... that's exactly what I was trying (I'm doing all my WebWorks stuff with the CLI), but I'm getting errors:

 

>webworks platform add android

C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:126
                    throw e;
                          ^
Error: An error occurred while listing Android targets
    at C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\lib\check_reqs.js:87:29
    at _rejected (C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:808:24)
    at C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:834:30
    at Promise.when (C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:1079:31)
    at Promise.promise.promiseDispatch (C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:752:41)
    at C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:574:44
    at flush (C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q.js:108:17)
    at process._tickCallback (node.js:419:13)
{ [Error: C:\Users\mrgreen\.cordova\lib\android\cordova\3.3.0\bin\create.bat: Command failed with exit code 8] code: 8 }

 



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.
Retired
Posts: 203
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: Android/iOS apps with WebWorks?

I've seen that before when the Android SDK wasn't properly configured.

 

Read through the platform guide and pay close attention to the environment variables and path settings that are required.

 

http://cordova.apache.org/docs/en/3.3.0/guide_platforms_android_index.md.html

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Developer
Posts: 1,158
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Android/iOS apps with WebWorks?

Thanks... it turned out I needed to have the Android 4.4.2 SDK installed even though I want to target 4.0 and above. This doesn't make sense to me, but I managed to get WebWorks to add the Android platform. I'm not sure yet if I'm going to be able to build for Android 4.0.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.  multiFEED Icon

Play nice: Clicking Like Button on posts that helped you not only encourages others to continue sharing their experience, but also improves your own rating on this board. Also, don't forget to accept a post if it solves your problem or answers your question.