Detect app is running on Kindle Fire

那年仲夏 提交于 2019-11-30 06:27:18

问题


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.


回答1:


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.




回答2:


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"));
}


来源:https://stackoverflow.com/questions/8309624/detect-app-is-running-on-kindle-fire

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!