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 |
static Int |
Default value for |
Inherited constants | |
---|---|
Public constructors | |
---|---|
FeatureInfo(orig: FeatureInfo!) |
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 |
toString() |
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
static val FLAG_REQUIRED: Int
Set on flags
if this feature has been required by the application.
Value: 1
GL_ES_VERSION_UNDEFINED
static val GL_ES_VERSION_UNDEFINED: Int
Default value for reqGlEsVersion
;
Value: 0
Public constructors
Public methods
describeContents
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
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
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
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
name
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
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
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.