user1566515
user1566515

Reputation: 1691

Detecting Kindle Fire version in Adobe AIR app

Is there a way to determine on which Kindle Fire type of device my app is running? I need to hide some features if the device is Kindle Fire (1st Gen), Kindle Fire (2nd Gen) or Kindle Fire HD 7 (3rd Gen).

One would think that flash.system.Capabilities or /system/build.prop would provide this info, but they don't. (correct me if I'm wrong)

I understand that getting this information would be trivial in a native Android app, but is there any way to do that in ActionScript under Adobe AIR without building a custom ANE?

Upvotes: 0

Views: 225

Answers (1)

BadFeelingAboutThis
BadFeelingAboutThis

Reputation: 14406

The flash.system.Capabilities has many properties relating to the device. the os property may or may not be specific enough to differentiate between the various kindles.

Chances are you use a combination of properties like manufacturer, os and screenDPI and cpuArchitecture to determine which Kindle it is.

If that doesn't work, then I know of 2 other ways you could accomplish this.

  1. Find or create a Native extension (ANE)

  2. Load the android properties file located at /system/build.prop and parse it for the value required. There is helper class that can take care it for you if you don't want to recreate the wheel: https://github.com/funky-monkey/Android-Native-Device-Info

Upvotes: 1

Related Questions