Added in API level 5

FeatureInfo

open class FeatureInfo : Parcelable
kotlin.Any
   ↳ android.content.pm.FeatureInfo

Definition of a single optional hardware or software feature of an Android device.

This object is used to represent both features supported by a device and features requested by an app. Apps can request that certain features be available as a prerequisite to being installed through the uses-feature tag in their manifests.

Starting in android.os.Build.VERSION_CODES#N, features can have a version, which must always be backwards compatible. That is, a device claiming to support version 3 of a specific feature must support apps requesting version 1 of that feature.

Summary

Constants
static Int

Set on flags if this feature has been required by the application.

static Int

Default value for reqGlEsVersion;

Inherited constants
Public constructors

Public methods
open Int

open String!

This method extracts the major and minor version of reqGLEsVersion attribute and returns it as a string.

open String

open Unit
writeToParcel(dest: Parcel, parcelableFlags: Int)

Properties
static Parcelable.Creator<FeatureInfo!>

Int

Additional flags.

String!

The name of this feature, for example "android.

Int

The GLES version used by an application.

Int

If this object represents a feature supported by a device, this is the maximum version of this feature supported by the device.

Constants

FLAG_REQUIRED

Added in API level 5
static val FLAG_REQUIRED: Int

Set on flags if this feature has been required by the application.

Value: 1

GL_ES_VERSION_UNDEFINED

Added in API level 5
static val GL_ES_VERSION_UNDEFINED: Int

Default value for reqGlEsVersion;

Value: 0

Public constructors

FeatureInfo

Added in API level 5
FeatureInfo()

FeatureInfo

Added in API level 5
FeatureInfo(orig: FeatureInfo!)

Public methods

describeContents

Added in API level 5
open fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getGlEsVersion

Added in API level 5
open fun getGlEsVersion(): String!

This method extracts the major and minor version of reqGLEsVersion attribute and returns it as a string. Say reqGlEsVersion value of 0x00010002 is returned as 1.2

Return
String! String representation of the reqGlEsVersion attribute

toString

Added in API level 5
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 5
open fun writeToParcel(
    dest: Parcel,
    parcelableFlags: Int
): Unit
Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.
flags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 5
static val CREATOR: Parcelable.Creator<FeatureInfo!>

flags

Added in API level 5
var flags: Int

Additional flags. May be zero or more of FLAG_REQUIRED.

name

Added in API level 5
var name: String!

The name of this feature, for example "android.hardware.camera". If this is null, then this is an OpenGL ES version feature as described in reqGlEsVersion.

reqGlEsVersion

Added in API level 5
var reqGlEsVersion: Int

The GLES version used by an application. The upper order 16 bits represent the major version and the lower order 16 bits the minor version. Only valid if name is null.

version

Added in API level 24
var version: Int

If this object represents a feature supported by a device, this is the maximum version of this feature supported by the device. The device implicitly supports all older versions of this feature.

If this object represents a feature requested by an app, this is the minimum version of the feature required by the app.

When a feature version is undefined by a device, it's assumed to be version 0.