Android APIs
public class

ConfigurationInfo

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

Class Overview

Information you can retrieve about hardware configuration preferences declared by an application. This corresponds to information collected from the AndroidManifest.xml's <uses-configuration> and <uses-feature> tags.

Summary

Constants
int GL_ES_VERSION_UNDEFINED Default value for reqGlEsVersion;
int INPUT_FEATURE_FIVE_WAY_NAV Value for reqInputFeatures: if set, indicates that the application requires a five way navigation device
int INPUT_FEATURE_HARD_KEYBOARD Value for reqInputFeatures: if set, indicates that the application requires a hard keyboard
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ConfigurationInfo> CREATOR
public int reqGlEsVersion The GLES version used by an application.
public int reqInputFeatures Flags associated with the input features.
public int reqKeyboardType Application's input method preference.
public int reqNavigation A flag indicating whether any keyboard is available.
public int reqTouchScreen The kind of touch screen attached to the device.
Public Constructors
ConfigurationInfo()
ConfigurationInfo(ConfigurationInfo 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 GL_ES_VERSION_UNDEFINED

Added in API level 4

Default value for reqGlEsVersion;

Constant Value: 0 (0x00000000)

public static final int INPUT_FEATURE_FIVE_WAY_NAV

Added in API level 3

Value for reqInputFeatures: if set, indicates that the application requires a five way navigation device

Constant Value: 2 (0x00000002)

public static final int INPUT_FEATURE_HARD_KEYBOARD

Added in API level 3

Value for reqInputFeatures: if set, indicates that the application requires a hard keyboard

Constant Value: 1 (0x00000001)

Fields

public static final Creator<ConfigurationInfo> CREATOR

Added in API level 3

public int reqGlEsVersion

Added in API level 4

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.

public int reqInputFeatures

Added in API level 3

Flags associated with the input features. Any combination of INPUT_FEATURE_HARD_KEYBOARD, INPUT_FEATURE_FIVE_WAY_NAV

public int reqKeyboardType

Added in API level 3

Application's input method preference. One of: KEYBOARD_UNDEFINED, KEYBOARD_NOKEYS, KEYBOARD_QWERTY, KEYBOARD_12KEY

public int reqNavigation

Added in API level 3

A flag indicating whether any keyboard is available. one of: NAVIGATION_UNDEFINED, NAVIGATION_DPAD, NAVIGATION_TRACKBALL, NAVIGATION_WHEEL

public int reqTouchScreen

Added in API level 3

The kind of touch screen attached to the device. One of: TOUCHSCREEN_NOTOUCH, TOUCHSCREEN_STYLUS, TOUCHSCREEN_FINGER.

Public Constructors

public ConfigurationInfo ()

Added in API level 3

public ConfigurationInfo (ConfigurationInfo orig)

Added in API level 3

Public Methods

public int describeContents ()

Added in API level 3

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 4

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 3

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 3

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.