Adobe Air - get device name (such as EVO, DROID X..)

前端 未结 6 1778
离开以前
离开以前 2021-01-21 02:06

I\'m working in Actionscript in Adobe Air, and I want to get a device\'s model name, such as \'EVO\' or \'DROID X\'. Has anyone been able to do this? Thanks.

相关标签:
6条回答
  • 2021-01-21 02:48

    You can try Android-Native-Device-Info it has device's brand, model, OS version and CPU, LCD Density, etc.

    0 讨论(0)
  • 2021-01-21 02:55

    To get these details (SSID, MAC address and device name) from iOS I found this ANE from as3 Gamegears. Github Project link.

    0 讨论(0)
  • 2021-01-21 03:01

    I found it... It is here: android.os.Build.MODEL

    0 讨论(0)
  • 2021-01-21 03:05

    Capabilities.os and Capabilities.manufacturer are probably sufficient for identifying an iOS device (iPhone, iPod, iPad, as well as their generation). On Android, the platform you specified, these properties are too general. In my testing, manufacturer is "Android Linux" and os is "Linux" plus numbers indicating the exact Linux version. This is enough for your code to recognize it's running on Android but little else.

    To access device name on Android, you'd need to write or find a Native Extension that returns android.os.Build.MODEL. Based on searching, no such extension exists yet.

    0 讨论(0)
  • 2021-01-21 03:09

    Take a look on Capabilities class (there are two properties os and manufacturer). I'm not sure if the device name is included in any of this.

    0 讨论(0)
  • 2021-01-21 03:11

    Probably late answer but maybe others still need it. If you looking for Native Extension to get Android device info you can check this DeviceInfoANE. Feel free to use and modify!

    0 讨论(0)
提交回复
热议问题