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

Adobe AIR Development

Reply
New Contributor
BangoSimone
Posts: 4
Registered: ‎09-05-2013
My Device: Blackberry Q10
My Carrier: O2

Native Extension device information error

Hi everyone, I need to create a native extension for AIR that will return to the AIR application a string with device model and model number, I need a custom extension becuase it has to return a specific formatted string because the interface will have to work on iOS and Android too.

 

My problem is that I am not a big expert with c/c++ and I am having some issues with the native project.

 

I create an AIR native extension with the NDK using the HelloWorld template, and if I #include <bb/device/HardwareInfo> I get the following error:

 

fatal error: QtGlobal: No such file or directory BlackberryInfo line 10, external location: C:\bbndk\target_10_1_0_1720\qnx6\usr\include\bb\device\Global.hpp C/C++ Problem

 

I am not sure what is this coming from or how to fix it, if someone could point me out my mistake, how to fix it or how to accomplish in other way what I am doing would be really appreciated. Thanks.

 

 

Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Native Extension device information error

I don't have much experience with ANE's myself, also not much experience with C/C++. Just to confirm you were following the helloWorld template here? ->

 

https://developer.blackberry.com/air/documentation/air_native_extensions.html 

 

 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
New Contributor
BangoSimone
Posts: 4
Registered: ‎09-05-2013
My Device: Blackberry Q10
My Carrier: O2

Re: Native Extension device information error

I used the Hello World template that appears when I create a new project, if I compile that one it just works, if I add the HardwareInfo library I get that error. I have already created and used an ANE but I can't seem to be able with this library. 

 

Thanks

Please use plain text.
Developer
pyth
Posts: 501
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
My Carrier: Outer Space

Re: Native Extension device information error

have you linked against the HardwareInfo library? according to the documentation, you have to open your *.pro - file and add the following line

 LIBS += -lbbdevice

 

 

https://developer.blackberry.com/native/reference/cascades/bb__device__hardwareinfo.html

-----------------------------------------------------------------------
I'm a bird from outer space. But I'm not flappy o.o
Please use plain text.