forked from funky-monkey/Android-Native-Device-Info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.TXT
37 lines (30 loc) · 2.45 KB
/
README.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Explanation:
Android Native Device Info:
Grab native device info like OS, Model, Brand, SDK Version and CPU. These AS3 classes uses Adobe AIR for Android to grab an Android system file named /system/build.prop, parse it and store its values in an nice value object for you to use. This parsed information is mainly used for analytics.
Usage:
var deviceInfo : NativeDeviceInfo = new NativeDeviceInfo();
deviceInfo.addEventListener(NativeDeviceInfoEvent.PROPERTIES_PARSED, handleDevicePropertiesParsed);
deviceInfo.setDebug(false);
deviceInfo.parse();
private function handleDevicePropertiesParsed(event : NativeDeviceInfoEvent) : void {
NativeDeviceInfo(event.target).removeEventListener(NativeDeviceInfoEvent.PROPERTIES_PARSED, handleDevicePropertiesParsed);
trace(NativeDeviceProperties.OS_NAME.label + " - " + NativeDeviceProperties.OS_NAME.value);
trace(NativeDeviceProperties.OS_VERSION.label + " - " + NativeDeviceProperties.OS_VERSION.value);
trace(NativeDeviceProperties.OS_BUILD.label + " - " + NativeDeviceProperties.OS_BUILD.value);
trace(NativeDeviceProperties.OS_SDK_VERSION.label + " - " + NativeDeviceProperties.OS_SDK_VERSION.value);
trace(NativeDeviceProperties.OS_SDK_DESCRIPTION.label + " - " + NativeDeviceProperties.OS_SDK_DESCRIPTION.value);
trace(NativeDeviceProperties.PRODUCT_MODEL.label + " - " + NativeDeviceProperties.PRODUCT_MODEL.value);
trace(NativeDeviceProperties.PRODUCT_BRAND.label + " - " + NativeDeviceProperties.PRODUCT_BRAND.value);
trace(NativeDeviceProperties.PRODUCT_NAME.label + " - " + NativeDeviceProperties.PRODUCT_NAME.value);
trace(NativeDeviceProperties.PRODUCT_VERSION.label + " - " + NativeDeviceProperties.PRODUCT_VERSION.value);
trace(NativeDeviceProperties.PRODUCT_BOARD.label + " - " + NativeDeviceProperties.PRODUCT_BOARD.value);
trace(NativeDeviceProperties.PRODUCT_CPU.label + " - " + NativeDeviceProperties.PRODUCT_CPU.value);
trace(NativeDeviceProperties.PRODUCT_MANUFACTURER.label + " - " + NativeDeviceProperties.PRODUCT_MANUFACTURER.value);
trace(NativeDeviceProperties.OPENGLES_VERSION.label + " - " + NativeDeviceProperties.OPENGLES_VERSION.value);
trace(NativeDeviceProperties.LCD_DENSITY.label + " - " + NativeDeviceProperties.LCD_DENSITY.value);
trace(NativeDeviceProperties.DALVIK_HEAPSIZE.label + " - " + NativeDeviceProperties.DALVIK_HEAPSIZE.value);
}
For more information on the use of this Class, take a look at: http://www.funky-monkey.nl/blog/?p=675
Author:
Sidney de Koning, 10-11-2010
sidney@funky-monkey.nl