Highlighted

How to connect Android SDK to Flash Pro project?

Participant ,
Jul 15, 2014

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

TOPICS
Development

Views

308

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to connect Android SDK to Flash Pro project?

Participant ,
Jul 15, 2014

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

TOPICS
Development

Views

309

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 15, 2014 0
Engaged ,
Jul 16, 2014

Copy link to clipboard

Copied

What do you want to do - read some device property? If so, which one?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
Participant ,
Jul 16, 2014

Copy link to clipboard

Copied

I'm wanting to use this class for my cross platform app.

http://www.funky-monkey.nl/blog/2010/11/11/getting-device-properties-like-os-model-brand-sdk-version...

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 16, 2014 0
Engaged ,
Jul 17, 2014

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2014 0
Infin8 LATEST
Participant ,
Jul 17, 2014

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 17, 2014 0