Reference: http://developer.android.com/guide/topics/manifest/uses-feature-element.html
<uses-feature> tags are located in the <manifest> tab and can be used to declare the hardware or software functionality that the application relies on. However, this is limited to claims and does not actually check for these features during installation. The actual code used in the function, or need to Packagemanager to determine whether the current environment is supported. The real purpose of these statements is to tell the external application what kind of device to design, which allows other services (such as the store) or other applications to get some information and interact with it, recommending the right application for the right device.
Grammar:
< uses-feature Android:name = "string" android:required| "false"] android:glesversion= "integer"/>
Property:
Android:name
Dependent hardware or software feature name
Android:required
If true, this means that this feature is required for this device, and that the application lacks this functionality will not work properly.
If False, it means that this feature is not required for this device, and that the application lacks this functionality to work properly.
The default value is True
Android:glesversion
If your app needs to rely on OpenGL ES, you'll need to fill in the version number here. The version number is represented by an integer, the integer height 16 bits represents the large version number, and the low 16 bits represent the minor version number, such as the version number of OpenGL ES 2.0 is 0x00020000. The entire app declares at most one glesversion, and if there are multiple declarations, take the one with the largest version number. If the app does not declare this attribute, the default is OpenGL ES 1.0. OpenGL es is backwards compatible, so you only need to declare the one that needs the highest version.
Dynamic way to get feature information:
When the app is running with a device feature, you need to determine if the device supports it. The Packagemanager.getsystemavailablefeatures method allows you to obtain all the supported features of the device, and the Packagemanager.hassystemfeature method allows you to determine if a feature is supported by the device.
With Packageinfo.reqfeatures, you can get a functional dependency on all claims of an app.
Hardware function Table:
Note that child functionality requires the parent function to be declared, at least android:required= "false"
Audio
Android.hardware.audio.low_latency
Low-latency audio channel for scenarios where latency is more most grateful.
Bluetooth
Android.hardware.bluetooth
bluetooth function
Android.hardware.bluetooth_le
Bluetooth 4.0 LE (Bluetooth Smart)
Camera
Android.hardware.camera
Camera function
Android.hardware.camera.autofocus
Auto Focus
Android.hardware.camera.flash
Flash
Android.hardware.camera.front
Front-facing camera
Android.hardware.camera.any
Camera in any direction
Android.hardware.camera.external
Extended camera
Infrared
Android.hardware.consumerir
Infrared communication
Positioning
Android.hardware.location
Use one or more ways to locate
Android.hardware.location.network
Using Network targeting
Android.hardware.location.gps
Using GPS positioning
Microphone
Android.hardware.microphone
Microphone function
Near Field communication
Android.hardware.nfc
Near Field communication function
Android.hardware.nfc.hce
HCE function
Sensor
Android.hardware.sensor.accelerometer
Accelerator
Android.hardware.sensor.barometer
Barometric pressure gauge
Android.hardware.sensor.compass
Compass
Android.hardware.sensor.gyroscope
Gyroscope
Android.hardware.sensor.light
Light sensor
Android.hardware.sensor.proximity
Proximity sensors
Android.hardware.sensor.stepcounter
Pedometer
Android.hardware.sensor.stepdetector
Step detection Device
Screen
Android.hardware.screen.landscape
Horizontal screen
Android.hardware.screen.portrait
Vertical screen
If the app supports two directions, it is not necessary to declare the above two functions.
Phone
Android.hardware.telephony
Phone function
Android.hardware.telephony.cdma
CDMA Calls
android.hardware.telephony.gsm
GSM Call
TV
Android.hardware.type.television
TV function
Touch screen
Android.hardware.faketouch
Basic touch screen function, only click
Android.hardware.touchscreen
Gesture-enabled touch capability. This feature is already declared by default and you can set required to False if you want to declare that the app can support non-touch
Android.hardware.touchscreen.multitouch
Two-point touch
Android.hardware.faketouch.multitouch.distinct
Two-point or multi-click Touch
Android.hardware.faketouch.multitouch.jazzhand
Five-point or more click-to-touch
Android.hardware.touchscreen.multitouch.distinct
Two-point or multi-touch
Android.hardware.touchscreen.multitouch.jazzhand
Five-point or more touch control
Usb
Android.hardware.usb.host
As a USB host port feature
Android.hardware.usb.accessory
As a USB client feature
Wifi
Android.hardware.wifi
Using the WiFi feature
Android.hardware.wifi.direct
WiFi Direct connection function
Software function table:
Android.software.app_widgets
Provides desktop component functionality
Android.software.device_admin
Provides Device Manager functionality
Android.software.home_screen
Provides custom home screen program functionality
Android.software.input_methods
Provides custom IME functionality
Android.software.live_wallpaper
Provide custom Live wallpaper features
Android.software.sip
Provides SIP functionality
Android.software.sip.voip
Provides digital analog signal function
In addition to the code in the use of system-provided hardware software features need to declare the appropriate permissions, the following is the function and permissions comparison table:
Http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions
Androidmanifest.xml <uses-feature> Nodes