Get Android System Available Features
An easy way to get system available features.
1 2 3 4 5 6 7 |
private void dumpSystemFeatures() { FeatureInfo[] features = this.getPackageManager().getSystemAvailableFeatures(); for (FeatureInfo f : features) { Log.i(LOGTAG, "dumpSystemFeatures f" + f); } } |
---|
Have a glance at the result
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d74fd0 android.hardware.wifi fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75048 android.hardware.location.network fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d750d8 android.hardware.nfc fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75150 com.google.android.feature.GOOGLE_BUILD fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d751f0 android.hardware.location fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75270 android.hardware.sensor.gyroscope fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75300 android.hardware.screen.landscape fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75390 android.hardware.screen.portrait fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75420 android.hardware.wifi.direct fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d754a8 android.hardware.usb.accessory fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75530 android.hardware.bluetooth fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d755b0 android.hardware.touchscreen.multitouch.distinct fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75660 android.hardware.microphone fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d756e8 android.hardware.sensor.light fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75770 android.hardware.camera.autofocus fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75800 android.software.live_wallpaper fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75890 android.hardware.camera.flash fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75918 android.hardware.telephony fl=0x0} I/MainActivity(13514): dumpSystemFeatures fFeatureInfo{40d75998 android.software.sip fl=0x0} ...... |
---|
The Other way
You can also use adb shell
to get into the shell of your device and the use pm list features
to get the available features of a device.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
root@android:/ # pm list features feature:reqGlEsVersion=0x20000 feature:android.hardware.bluetooth feature:android.hardware.camera feature:android.hardware.camera.autofocus feature:android.hardware.camera.flash feature:android.hardware.camera.front feature:android.hardware.faketouch feature:android.hardware.location feature:android.hardware.location.gps feature:android.hardware.location.network feature:android.hardware.microphone feature:android.hardware.nfc feature:android.hardware.screen.landscape feature:android.hardware.screen.portrait feature:android.hardware.sensor.accelerometer feature:android.hardware.sensor.compass feature:android.hardware.sensor.gyroscope feature:android.hardware.sensor.light feature:android.hardware.sensor.proximity feature:android.hardware.telephony feature:android.hardware.telephony.gsm feature:android.hardware.touchscreen feature:android.hardware.touchscreen.multitouch feature:android.hardware.touchscreen.multitouch.distinct feature:android.hardware.touchscreen.multitouch.jazzhand feature:android.hardware.usb.accessory feature:android.hardware.usb.host feature:android.hardware.wifi feature:android.hardware.wifi.direct feature:android.software.live_wallpaper feature:android.software.sip feature:android.software.sip.voip feature:com.cisco.anyconnect.permissions.patch.htc feature:com.htc.android.rosie.widget feature:com.htc.lockscreen.fusion feature:com.nxp.mifare |
---|
For a detailed understanding of use-filter,please read this post http://developer.android.com/guide/topics/manifest/uses-feature-element.html
Others
- 我的Android进阶之旅------>Android采用AES+RSA的加密机制对http请求进行加密
- 看到那个Edward 了吗?对!其实它是个Python库
- (35) 泛型 (上) - 基本概念和原理 / 计算机程序的思维逻辑
- 将linux下的rm命令改造成mv到指定的目录下
- (36) 泛型 (中) - 解析通配符 / 计算机程序的思维逻辑
- Python优化第一步: 性能分析实践
- Python云计算框架:OpenStack源码分析之RabbitMQ(二)
- 编程获得CPU的主频
- Python多进程并行编程实践:以multiprocessing模块为例
- 由函数clock想到的
- (34) 随机 / 计算机程序的思维逻辑
- 创建和使用Windows静态链接库
- (37) 泛型 (下) - 细节和局限性 / 计算机程序的思维逻辑
- 快速失败Vs安全失败(Java迭代器附示例)
- java教程
- Java快速入门
- Java 开发环境配置
- Java基本语法
- Java 对象和类
- Java 基本数据类型
- Java 变量类型
- Java 修饰符
- Java 运算符
- Java 循环结构
- Java 分支结构
- Java Number类
- Java Character类
- Java String类
- Java StringBuffer和StringBuilder类
- Java 数组
- Java 日期时间
- Java 正则表达式
- Java 方法
- Java 流(Stream)、文件(File)和IO
- Java 异常处理
- Java 继承
- Java 重写(Override)与重载(Overload)
- Java 多态
- Java 抽象类
- Java 封装
- Java 接口
- Java 包(package)
- Java 数据结构
- Java 集合框架
- Java 泛型
- Java 序列化
- Java 网络编程
- Java 发送邮件
- Java 多线程编程
- Java Applet基础
- Java 文档注释
- java_Collection、Map、泛型的使用
- java_线程、同步、线程池
- Oracle参数解析(nls_timestamp_format)
- Vue使用uuid-npm快速生成uuid,适用于多种场景
- WPF调用图片或资源(Uri)
- Hexo部署远程仓库(Conding、Gitee、Github)
- Linux下安装nginx
- CSS简笔画logo系列:纯CSS绘制“Adidas” Logo
- Electron + Vue跨平台桌面应用开发实战教程(一)
- java_抽象类、接口、多态的使用
- Electron + Vue跨平台桌面应用开发实战教程(二)
- Oracle参数解析(nls_length_semantics)
- 创建单页
- Electron + Vue跨平台桌面应用开发实战教程(三)
- ES6箭头函数中this指向谁?