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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

BlackBerry WebWorks Contributions

Reply
New Contributor
hoomi_2010
Posts: 4
Registered: ‎08-20-2012
My Carrier: 3
Accepted Solution

Any limit on what native APIs can be called from our customized webworks extensions? (BB10)

Hi everyone

 

I have been trying to deploy my own webworks extension on BB10 to call  "navigator_set_orientation()"  , which is a native API. But when I deploy the application which uses this extension, the freezes on the blackberry page at the start. However, when I remove "navigator_set_orientation()" from my native code, everything works fine.

 

I tried a pure native app with  "navigator_set_orientation()"  being used and it worked fine.

 

I also checked the bar-descriptor.xml(from the pure native app) and blackberry-tablet.xml (hybrid app) I saw that their <action> tag is different. In the first case it was

<action system="true">run-native<action>

 

 and for the second case it was 

<action>access-internet<action>

 

 

This made me think maybe we are not allowed to access some native APIs from webworks extensions. 

 

I was wondering if any of you experts have more knowledge about this?

 

Thanks

Please use plain text.
New Contributor
hoomi_2010
Posts: 4
Registered: ‎08-20-2012
My Carrier: 3

Re: Any limit on what native APIs can be called from our customized webworks extensions? (BB10)

I finally found the solution to my own issue

 

I forgot to add 

bps_initialize(); and 

bps_shutdown();

 

and I had to add the bps library to the QCC Linker Libraries then everything worked fine. (by right clicking on the project properties>C/C++ Build>Settings >QCC Linker add bps to Libraries section)

Please use plain text.