Need to know about usability in Android?

'uses-feature' is used like this:

  <uses-feature
  android:name="string"
  android:required=["true" | "false"]
  android:glEsVersion="integer" />

      

What are 'android: required' and 'android: glEsVersion ?

+3


source to share


3 answers


required

used to indicate that a function used by an application is necessary for the application; without this function, the application will be useless or will not work. If your app uses gps, for example, as a nice-to-use feature, but not really necessary, you can set required

to false

. This way, users with devices that don't have GPS-enabled devices can download your app from the Play Store, which they couldn't otherwise.

glEsVersion

only needed if this feature requires OpenGL ES. In this case, you may need to specify at least one version to be used in the context.




Or, as stated in the developer instructions:

The required element offers a required attribute that allows you to indicate whether your application is required and cannot function without the declared function, or whether it prefers this function but can work without it. ( Android Dev Guidelines )

glEsVersion . Some functions may have a specific attribute that allows you to define the version of the function, such as the Open GL version to use (declared with glEsVersion). [...] An application must specify at most one android: glEsVersion attribute in its manifest. If it specifies more than one, android: glEsVersion with the highest value is used and any other values ​​are ignored. If the application does not specify the android: glEsVersion attribute, it is assumed that the application only requires OpenGL ES 1.0, which is supported by all Android devices. ( Android Dev Guidelines )

More on <uses-feature>

in the Android Developers Guide

+3


source


android: Required when each device does not support the hardware or features your application needs.

Example. My app is useful for the purpose of backing up SMS, contacts, calllog, apk, etc. But some tablets don't have a sim card and android: required = "false" for me if this app runs on this device.



android: glEsVersion. The OpenGL ES version required by the application. The higher 16 bits represent the base number and the lower 16 bits represent the minor number. For example, to specify the OpenGL ES 2.0 version, you must set the value to "0x00020000", or to specify OpenGL ES 3.0, you must set the value to "0x00030000".

+2


source


As described in android developer.android :

<uses-feature>

allows you to specify if your application is required and cannot function without the declared function.

android:glEsVersion

The OpenGL ES version required by the application.

+2


source







All Articles