# Print output for @column tags ?> GameManager - Android SDK | Android Developers

Most visited

Recently visited

GameManager

public final class GameManager
extends Object

java.lang.Object
   ↳ android.app.GameManager


The GameManager allows system apps to modify and query the game mode of apps.

Summary

Constants

int GAME_MODE_BATTERY

Battery game mode will save battery and give longer game play time.

int GAME_MODE_PERFORMANCE

Performance game mode maximizes the game's performance.

int GAME_MODE_STANDARD

Standard game mode means the platform will use the game's default performance characteristics.

int GAME_MODE_UNSUPPORTED

Game mode is not supported for this application.

Public methods

int getGameMode()

Return the user selected game mode for this application.

Inherited methods

Constants

GAME_MODE_BATTERY

public static final int GAME_MODE_BATTERY

Battery game mode will save battery and give longer game play time.

Constant Value: 3 (0x00000003)

GAME_MODE_PERFORMANCE

public static final int GAME_MODE_PERFORMANCE

Performance game mode maximizes the game's performance.

This game mode is highly likely to increase battery consumption.

Constant Value: 2 (0x00000002)

GAME_MODE_STANDARD

public static final int GAME_MODE_STANDARD

Standard game mode means the platform will use the game's default performance characteristics.

Constant Value: 1 (0x00000001)

GAME_MODE_UNSUPPORTED

public static final int GAME_MODE_UNSUPPORTED

Game mode is not supported for this application.

Constant Value: 0 (0x00000000)

Public methods

getGameMode

public int getGameMode ()

Return the user selected game mode for this application.

An application can use android:isGame="true" or android:appCategory="game" to indicate that the application is a game. If an application is not a game, always return GAME_MODE_UNSUPPORTED.

Developers should call this API every time the application is resumed.

Returns
int Value is GAME_MODE_UNSUPPORTED, GAME_MODE_STANDARD, GAME_MODE_PERFORMANCE, or GAME_MODE_BATTERY