11-10-2011 05:30 PM - edited 11-11-2011 10:15 AM
Unfortunately there is no direct route at this time, however I am in the process of verifying the following:
1) Create an AIR Extension to be accessed from your WebWorks application:
2) Within that AIR Extension, access a native Extension:
Essentially, the chain becomes: WebWorks > Air > Native.
As noted, it is slightly round-about, however direct Native Extensions are not supported by WebWorks at this time. If you're willing to give it a go, let us know how it works out. I'll post my results once I've tested this as well.
EDIT: Fixed URLs.
BlackBerry Development Advisor
11-11-2011 10:19 AM
11-18-2011 02:29 PM
Currently WebWorks is wrapped as an AIR application because it was the only deployment avenue at the time. As we move towards BBX we will be migrating the WebWorks code base out of AIR down to something closer to the platform.
At that point you won't have the extra layer of creating an AIR Native Extension. What I would suggest is that if you are building an extension for WebWorks, build it in the NDK with an AIR wrapper for now, and that way when WebWorks comes down closer to the QNX core you can remove the AIR wrapper in future BBX versions.
11-21-2011 08:51 AM
There's documentation here:
And a 3rd party writeup here:
11-21-2011 10:43 PM
Thanks for your info.
Currently, I have created an ane and run it in a AIR simple application successfully.
I also create a webworks extension and run it with a Webworks app successfully.
So, my current issue is how to integrate this two together.
Based on the document, there are 4 steps to integrate a ane into an AIR application, So I do them one by one for my Webworks app.
1. include NativeAS3.swc.
I copy NativeAS3.swc into the lib folder in WebWorks SDK (\bbwp\blackberry-tablet-sdk\frameworks\libs). It seems works.
2. Extra package options: -ane ../../NativeAS3/package/com.example.ane
I don't know how to add this option. So I directly zip the ane file into my WebWork application package file.
3. Add tag <extensions> into *-app.xml file. For my WebWorks application, I added it in WebWorksAppTemplate-app.xml which is in WebWorks SDK.
4. Add tag <action> into bar file descriptor. I added it in blackberry-tablet.xml which is also located in WebWorks SDK.
With all this done. I got that, my WebWorks cannot boot up at all.
I guess it is because the system can not find ane file.
If I remove the <extension> section in WebWorksAppTemplate-app.xml. Then the app can boot up. But when the ane function is called, an error is got. The error is:
Syntax Error: Unable to parse JSON String.
In short words, I believe that I haven't found the way to pack the ane file in my WebWorks app.
Do you have any suggestion for that?