Android APIs
public class

FeatureInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ android.content.pm.FeatureInfo

Class Overview

A single feature that can be requested by an application. This corresponds to information collected from the AndroidManifest.xml's <uses-feature> tag.

Summary

Constants
int FLAG_REQUIRED Set on flags if this feature has been required by the application.
int GL_ES_VERSION_UNDEFINED Default value for reqGlEsVersion;
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<FeatureInfo> CREATOR
public int flags Additional flags.
public String name The name of this feature, for example "android.hardware.camera".
public int reqGlEsVersion The GLES version used by an application.
Public Constructors
FeatureInfo()
FeatureInfo(FeatureInfo orig)
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
String getGlEsVersion()
This method extracts the major and minor version of reqGLEsVersion attribute and returns it as a string.
String toString()
Returns a string containing a concise, human-readable description of this object.
void writeToParcel(Parcel dest, int parcelableFlags)
Flatten this object in to a Parcel.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final int FLAG_REQUIRED

Added in API level 5

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

Constant Value: 1 (0x00000001)

public static final int GL_ES_VERSION_UNDEFINED

Added in API level 5

Default value for reqGlEsVersion;

Constant Value: 0 (0x00000000)

Fields

public static final Creator<FeatureInfo> CREATOR

Added in API level 5

public int flags

Added in API level 5

Additional flags. May be zero or more of FLAG_REQUIRED.

public String name

Added in API level 5

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.

public int reqGlEsVersion

Added in API level 5

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.

Public Constructors

public FeatureInfo ()

Added in API level 5

public FeatureInfo (FeatureInfo orig)

Added in API level 5

Public Methods

public int describeContents ()

Added in API level 5

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public String getGlEsVersion ()

Added in API level 5

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

Returns
  • String representation of the reqGlEsVersion attribute

public String toString ()

Added in API level 5

Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:

   getClass().getName() + '@' + Integer.toHexString(hashCode())

See Writing a useful toString method if you intend implementing your own toString method.

Returns
  • a printable representation of this object.

public void writeToParcel (Parcel dest, int parcelableFlags)

Added in API level 5

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written.
parcelableFlags Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.