<uses-feature android:glEsVersion="integer" android:name="string" android:required=["true" | "false"] />
<manifest>
Android Market and <uses-feature> elements
Android Market filters the applications that are visible to users, so that users can see and download only those applications that are compatible with their devices. One of the ways Market filters applications is by feature compatibility.
To do this, Market checks the
<uses-feature> elements in each application's manifest, to
establish the app's feature needs. Market then shows or hides the application to
each user, based on a comparison with the features available on the user's
device.
By specifying the features your application requires, you enable Android Market to present your application only to users whose devices meet the application's feature requirements, rather than presenting it to all users.
<uses-sdk> element, this element
allows an application to specify which device-variable features it uses. For
example, an application might specify that it requires a camera with auto-focus
capabilities.
Declaring a <uses-feature> element is informational only, meaning
that the Android system itself does not check for matching feature support on
the device before installing an application. However, note that other services
(such as Android Market) or applications may check your application's
<uses-feature> declarations as part of handling or interacting
with your application. For this reason, it's very important that you declare all of
the features (from the list below) that your application uses.
For some features, there may exist a specfic attribute that allows you to define
a version of the feature, such as the version of Open GL used (declared with
glEsVersion). Other features that either do or do not
exist for a device, such as a camera, are declared using the
name attribute.
Any software or hardware features that may vary among Android-powered devices
will be listed on this page among the attributes below. If you see any features
here that you use in your application, you should include a
<uses-feature> element for each one. For example, if your
application uses the device camera, then you should include the following in
your AndroidManifest.xml:
<uses-feature android:name="android.hardware.camera" />
If you declare 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
<uses-feature> element that declares the android.hardware.camera.autofocus
feature. Also note that you must still request 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.
Although the <uses-feature> element is only activated for devices running
API Level 4 or higher, it is safe to include this for applications that declare
a minSdkVersion
of "3" or lower. Devices running older versions of the platform
will simply ignore this element, but newer devices will recognize it and enforce
installation restrictions based on whether the device supports the feature.
Note:
For each feature required by your application, you must include a new <uses-feature> element. Multiple features cannot be declared in one
instance of this element.
android:glEsVersionAn application should specify at most one android:glEsVersion
attribute in its manifest. If it specifies more than one, the
android:glEsVersion with the numerically highest value is used and
any other values are ignored.
If an application does not specify an android:glEsVersion
attribute, then it is assumed that the application requires only OpenGL ES 1.0,
which is supported by all Android-powered devices.
An application can assume that if a platform supports a given OpenGL ES version, it also supports all numerically lower OpenGL ES versions. Therefore, an application that requires both OpenGL ES 1.0 and OpenGL ES 2.0 must specify that it requires OpenGL ES 2.0.
An application that can work with any of several OpenGL ES versions should only specify the numerically lowest version of OpenGL ES that it requires. (It can check at run-time whether a higher level of OpenGL ES is available.)
android:name| Feature | Attribute Value | Description |
|---|---|---|
| Camera | android.hardware.camera |
The application requires a camera. |
Note: Any application that requests the
CAMERA permission but does not
declare any camera features with the <uses-feature> element will be assumed
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
<uses-feature> to declare only the camera features that your
application does need. For instance, if you request the
CAMERA permission, but you do not need auto-focus or
flash, then declare only the android.hardware.camera featurethe other
camera features that you do not request will no longer be assumed as required.
|
||
| Camera auto-focus | android.hardware.camera.autofocus |
The application requires a camera with auto-focus capability.
As a prerequisite, android.hardware.camera must also be declared
with a separate <uses-feature> element.
|
| Camera flash | android.hardware.camera.flash |
The application requires a camera with a flash.
As a prerequisite, both android.hardware.camera and android.hardware.camera.autofocus must also be declared
with separate <uses-feature> elements.
|
| Light sensor | android.hardware.sensor.light |
The application requires a device with a light sensor. |
| Live Wallpaper | android.software.live_wallpaper |
The application uses or provides Live Wallpapers and should be installed only on devices that support Live Wallpapers. |
| Proximity sensor | android.hardware.sensor.proximity |
The application requires a device with a proximity sensor. |
| Multitouch screen | android.hardware.touchscreen.multitouch |
The application requires a device that supports multitouch. |
| Telephony | android.hardware.telephony |
The application requires a device that includes a telephony radio with data communication services. |
| CDMA telephony | android.hardware.telephony.cdma |
The application requires a device that includes a CDMA telephony radio. As a
prerequisite, android.hardware.telephony must also be declared
with a separate <uses-feature> element.
|
| GSM telephony | android.hardware.telephony.gsm |
The application requires a device that includes a GSM telephony radio. As a
prerequisite, android.hardware.telephony must also be declared
with a separate <uses-feature> element.
|
android:requiredtrue 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 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 android.hardware.camera feature and set the required
attribute false. This is necessary because the 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 required attribute false for
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.
<uses-feature android:glEsVersion="integer"
android:name="string" />
예를 들어, 애플리케이션은 자동auto 포커스 능력을 가진 카메라를 필요로 한다는 것을 지정할 지도 모른다. 만약, 디바이스가 자동 포커스를 가지는 카메라를 지원하지 않는다면 그 디바이스는 애플리케이션의 설치를 허용하지 않을 것이다.
엄격한 디바이스 호환성을 유지하기 위해서, 여러분의 애플리케이션이 사용하는 모든 기능을 선언하기 위해서 여러분이 이 엘리먼트를 사용하는 것은 매우 중요하다. 기능을 선언하지 않게 되면 결과적으로 여러분의 애플리케이션은 그 기능을 지원하지 않는 디바이스 상에서 설치되어서 여러분의 애플리케이션은 작동하지 않을 수도 있다.
특정 기능에 대해서, 여러분으로 하여금 사용된 OpenGL 버전(glEsVersion을 사용하여 선언됨)과 같이 기능의 버전을 정의하도록 허용하는 특정 애트리뷰트가 존재할 수도 있다. 카메라 자동 포커스와 같이, 디바이스에 존재하거나 또는 존재하지 않는 다른 기능은 name 애트리뷰트를 사용해서 선언된다.
안드로이드 디바이스들 사이에서 달라질 수 있는 소프트웨어 또는 하드웨어 기능들은 이 페이지에서 나열될 것이다. 만약 여러분이 여러분의 애플리케이션에서 사용하는 어떤 기능들을 본다면, 여러분은 각각에 대해서 <uses-feature>를 포함시켜야 한다. 예를 들어 여러분의 애플리케이션이 디바이스 카메라를 사용한다면, 여러분은 AndroidManifest.xml에 다음을 포함시켜야 한다.
<uses-feature android:name="android.hardware.camera" />
만약 여러분이 “android.hardware.camera”를 선언한다면, 자동 포커스를 이용할 수 있는 지 여부와 상관없이 여러분의 애플리케이션은 카메라를 포함하는 모든 디바이스와 호환가능한 것으로 간주된다. 만약 여러분이 또한 자동 포커스 기능(카메라 API를 통해 이용가능)을 사용한다면, 여러분은 “android.hardware.camera.autofocus” 기능을 선언하는 추가적인 <uses-feature> 엘리먼트를 포함시킬 필요가 있다. 또한 여러분은 여전히 CAMERA 퍼미션을 요구해야 한다는 것에 주의하라. 여러분의 애플리케이션에 의해 사용되는 기능을 선언하는 것은 적합한 디바이스 호환성을 보장하는 반면에, 퍼미션을 요구하는 것은 여러분의 애플리케이션이 적합한 하드웨어와 소프트웨어에 접근하는 것을 허용한다.
비록 <uses-feature> 엘리먼트는 단지 API 레빌 4 또는 그 이상을 실행하는 디바이스에 대해서 활성화된다 할 지라도, “3” 또는 그 이하의 minSdkVersion을 선언하는 애플리케이션에 대해서 이것을 포함하는 것이 안전하다. 낮은 버전의 플랫폼을 실행하는 디바이스는 간단히 이 엘리먼트를 무시할 것이다. 하지만, 더 새로운 디바이스는 이 엘리먼트를 인식하고 디바이스가 그 기능을 지원하는 지 여부에 근거하여 설치 제약을 강제할 것이다.
Note: 여러분의 애플리케이션에 의해서 요구되는 각 기능에 대해서, 여러분은 새로운 <uses-feature> 엘리먼트를 포함시켜야 한다. 여러 기능들이 이 엘리먼트의 한 인스턴스에서 선언될 수 없다.
| 기능 | 값 | 설명 |
|---|---|---|
| Camera | "android.hardware.camera" | 애플리케이션이 카메라를 필요로 한다. |
| "android.hardware.camera.autofocus" | 애플리케이션이 자동 포커스 기능을 가진 카메라를 필요로 한다. 필요 조건으로, “android.hardware.camera”가 별도의 <uses-feature> 엘리먼트에 선언되어야 한다. | |
| Note:카메라 퍼미션을 요구하지만 <uses-feature> 엘리먼트를 사용하여 카메라 기능을 선언하지 않는 애플리케이션은 (자동 포커스와 같은) 모든 카메라 기능을 사용하기 위한 것으로 가정할 것이다. 따라서, 애플리케이션은 모든 기능을 지원하지 않는 디바이스와 호환이 불가능할 것이다. 여러분의 애플리케이션이 필요로 하는 카메라 기능만을 선언하기 위해 <uses-feature>를 사용하길 부탁한다. | ||