android判断当前设备的支持哪些Feature 可以使用 public abstract boolean hasSystemFeature (String name)判断是否支持某个属性 在应用程序中使用方法 if(!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS)){/**/} 还可以用 getSystemAvailableFeatures ()列出当前设备所有属性。 对于设备端来说,是否支持这些feature,就要放各种.xml文件到 /system/etc/permissions下面诸如: android.hardware.camera.front.xml android.hardware.location.gps.xml android.hardware.sensor.accelerometer.xml android.hardware.telephony.gsm.xml android.hardware.touchscreen.multitouch.jazzhand.xml android.hardware.usb.accessory.xml android.hardware.wifi.xml 等等这些文件存在于frameworks/base/data/etc 修改Android.mk就可把他们放到/system/etc/permissions里面去了。 在rk方案中所有许可的路径是\frameworks\native\data\etc\下 cope的mk文件是device\rockchip\rk30sdk\device.mk 目标目录是out\target\product\rk30sdk\system\etc\permissions\
android判断当前设备的支持哪些Feature
最新推荐文章于 2023-08-01 16:09:50 发布