Detect app is running on Kindle Fire

2019-01-22 02:23发布

Does anyone know how to detect if the app is running on Kindle Fire ?

My app needs to turn off a few features if running on the Kindle Fire and I want to use the same build as Google Marketplace.

标签: kindle-fire
2条回答
一纸荒年 Trace。
2楼-- · 2019-01-22 02:47

Based on the official Kindle Fire Device and Feature Specifications I currently use this code:

public static boolean isKindleFire() {
    return android.os.Build.MANUFACTURER.equals("Amazon")
            && (android.os.Build.MODEL.equals("Kindle Fire")
                || android.os.Build.MODEL.startsWith("KF"));
}
查看更多
Juvenile、少年°
3楼-- · 2019-01-22 03:04

You can read android.os.Build.MANUFACTURER and android.os.Build.MODEL. On a Kindle Fire 1st Generation they are 'Amazon' and 'Kindle Fire' respectively. For model codes of newer Kindle Fire devices, see Device and Feature Specifications on Amazon's developer site.

查看更多
登录 后发表回答