Copy link to clipboard
Copied
Hi,
I'm trying to import the android.NativeDeviceInfo class into my AIR for Android project but unsure on how to do this exactly.
import android.NativeDeviceInfo;
import android.NativeDeviceProperties;
I understand how to link libraries and ANE's to my project via the ActionScript 3 Settings panel. I just don't know what to link to?
Could anyone give me a pointer?
Thanks,
Mark
Copy link to clipboard
Copied
Hi,
I'm trying to import the android.NativeDeviceInfo class into my AIR for Android project but unsure on how to do this exactly.
import android.NativeDeviceInfo;
import android.NativeDeviceProperties;
I understand how to link libraries and ANE's to my project via the ActionScript 3 Settings panel. I just don't know what to link to?
Could anyone give me a pointer?
Thanks,
Mark
Copy link to clipboard
Copied
What do you want to do - read some device property? If so, which one?
Copy link to clipboard
Copied
I'm wanting to use this class for my cross platform app.
Ideally I would like to know:
NativeDeviceProperties.OS_NAME).value);
NativeDeviceProperties.OS_VERSION).value);
NativeDeviceProperties.OS_BUILD).value);
NativeDeviceProperties.PRODUCT_MODEL).value);
NativeDeviceProperties.PRODUCT_BRAND).value);
NativeDeviceProperties.PRODUCT_NAME).value);
NativeDeviceProperties.PRODUCT_VERSION).value);
NativeDeviceProperties.PRODUCT_MANUFACTURER).value);
NativeDeviceProperties.LCD_DENSITY).value);
Thanks
Copy link to clipboard
Copied
That class only works on android. It hasn't been updated in 3 years. To use it copy the src folder from the github project into your project. Sample code to use in your project is in the file testing/AndroidNativeDeviceInfoTestClass.as.
Copy link to clipboard
Copied
Thanks for the info. I understand what you are saying however, when I try to export my Android app I get the following errors:
1172: Definition android:NativeDeviceInfo could not be found.
1172: Definition android:NativeDeviceProperties could not be found.
So it would seem the import statements that I'm using aren't locating these files.