3

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 Answers 6

2

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.

2

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

2
  • I didn't see a license or a copyright on the repository, but the source files each have a copyright notice that says, "All Rights Reserved." Other people have mentioned this library too, but I'm wondering if it's safe to use it? Feb 5, 2015 at 18:59
  • 1
    @Panzercrisis sorry not sure about that, other wise see my latest answer stackoverflow.com/a/34408873/1578100
    – Januartha
    Dec 22, 2015 at 5:17
1

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.

1
  • There is some info in there, but not the device name..Thanks for the reply.
    – Seth
    Oct 18, 2011 at 15:32
0

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

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
    – bummi
    Jan 16, 2015 at 16:27
  • I'm not going to include the code for the whole ANE project on here am I? I've added a direct link to the project on Github as well now, to make the world a better place.
    – Ted
    Jan 16, 2015 at 16:38
0

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!

-2

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

2
  • Why is this a downvoted if I post the correct answer since I found it?
    – Seth
    Oct 11, 2012 at 22:37
  • 1
    I didn't downvote but your answer is very short, you don't explain how you use it ,if from native extension or from ActionScript code Nov 11, 2012 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.