diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd index f47dec4e9dae1..63bb934bf2c43 100644 --- a/docs/html/guide/topics/manifest/uses-feature-element.jd +++ b/docs/html/guide/topics/manifest/uses-feature-element.jd @@ -50,12 +50,12 @@ camera, then you should include the following in your {@code AndroidManifest.xml <uses-feature android:name="android.hardware.camera" /> -

If you declare {@code android.hardware.camera}, then your application is considered +

If you declare {@code android.hardware.camera} this way, then your application is considered compatible with all devices that include a camera. If your application also uses auto-focus features, then you also need to include a {@code <uses-feature>} element that declares the {@code android.hardware.camera.autofocus} feature. Also note that you must still request the {@link android.Manifest.permission#CAMERA -CAMERA} permission. Requesting permission grants your application access to the +CAMERA} permission. Requesting the permission grants your application access to the appropriate hardware and software, while declaring the features used by your application ensures proper device compatibility.

@@ -81,8 +81,8 @@ instance of this element.

{@code android:glEsVersion}
The GLES version needed by the application. The higher 16 bits represent the major number and the lower 16 bits - represent the minor number. For example, for GL 1.2 referring to - 0x00000102, the actual value should be set as 0x00010002. + represent the minor number. For example, for GL 1.2, + the value should be set as {@code 0x00010002}.
{@code android:name}
@@ -96,7 +96,7 @@ instance of this element.

Description Camera - "{@code android.hardware.camera}" + {@code android.hardware.camera} The application requires a camera. @@ -106,37 +106,81 @@ instance of this element.

to use all camera features (auto-focus and flash). Thus, the application will not be compatible with devices that do not support all camera features. Please use {@code <uses-feature>} to declare only the camera features that your - application does need. For instance, if you requests the - {@link android.Manifest.permission#CAMERA} permission, but does not need auto-focus or - flash, then declare only the {@code android.hardware.camera} feature—the camera - features that you do not request will no longer be assumed as required. + application does need. For instance, if you request the + {@link android.Manifest.permission#CAMERA} permission, but you do not need auto-focus or + flash, then declare only the {@code android.hardware.camera} feature—the other + camera features that you do not request will no longer be assumed as required. Camera auto-focus - "{@code android.hardware.camera.autofocus}" + {@code android.hardware.camera.autofocus} The application requires a camera with auto-focus capability. - As a prerequisite, "{@code android.hardware.camera}" must also be declared + As a prerequisite, {@code android.hardware.camera} must also be declared with a separate {@code <uses-feature>} element. + + Camera flash + {@code android.hardware.camera.flash} + The application requires a camera with a flash. + As a prerequisite, both {@code android.hardware.camera} and {@code + android.hardware.camera.autofocus} must also be declared + with separate {@code <uses-feature>} elements. + + + Light sensor + {@code android.hardware.sensor.light} + The application requires a device with a light sensor. + + + Proximity sensor + {@code android.hardware.sensor.proximity} + The application requires a device with a proximity sensor. + + + Multitouch screen + {@code android.hardware.touchscreen.multitouch} + The application requires a device that supports multitouch. + + + Telephony + {@code android.hardware.telephony} + The application requires a device that includes a telephony radio with data + communication services. + + + CDMA telephony + {@code android.hardware.telephony.cdma} + The application requires a device that includes a CDMA telephony radio. As a + prerequisite, {@code android.hardware.telephony} must also be declared + with a separate {@code <uses-feature>} element. + + + GSM telephony + {@code android.hardware.telephony.gsm} + The application requires a device that includes a GSM telephony radio. As a + prerequisite, {@code android.hardware.telephony} must also be declared + with a separate {@code <uses-feature>} element. +
{@code android:required}
Indicates whether the feature is required by the application. This is - "true" by default. You should not use this attribute for most cases. + {@code true} by default. You should not use this attribute for most cases.

-

The only situation in which you should set this attribute "false" is when your application - requests the {@link android.Manifest.permission#CAMERA} permission, but will degrade gracefully - and perform without failure if the device does not have a camera. In this situation, you must - declare the "{@code android.hardware.camera}" feature and set the {@code required} attribute - "false". This is necessary because the {@link android.Manifest.permission#CAMERA} permission - will automatically turn on the requirement for all camera features. So if your application uses - this permission but is still compatible with devices without a camera, then you must set this - attribute "false" for "{@code android.hardware.camera}" or else it will not install on devices - without a camera. Note that, while the permission will enable the requirement for all - camera features, you only need to off the requirement for the basic camera feature.

+

The only situation in which you should set this attribute {@code false} is when your + application requests the {@link android.Manifest.permission#CAMERA} permission, but will degrade + gracefully and perform without failure if the device does not have a camera. In this situation, + you must declare the {@code android.hardware.camera} feature and set the {@code required} + attribute {@code false}. This is necessary because the {@link + android.Manifest.permission#CAMERA} permission will automatically turn on the requirement for + all camera features. So if your application uses this permission but is still compatible with + devices without a camera, then you must set the {@code required} attribute {@code false} for + {@code android.hardware.camera} or else it will not install on devices without a camera. Note + that, while the permission will enable the requirement for all camera features, you + only need to off the requirement for the basic camera feature.