Udostępnij za pośrednictwem


GameManager.GameMode Property

Definition

Return the user selected game mode for this application.

public int GameMode { [Android.Runtime.Register("getGameMode", "()I", "", ApiSince=31)] get; }
[<get: Android.Runtime.Register("getGameMode", "()I", "", ApiSince=31)>]
member this.GameMode : int

Property Value

Attributes

Remarks

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.

If a game's targetSdkVersion is android.os.Build.VERSION_CODES#TIRAMISU or lower, and when the game mode is set to #GAME_MODE_CUSTOM which is available in android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE or newer, this API will return #GAME_MODE_STANDARD instead for backward compatibility.

Java documentation for android.app.GameManager.getGameMode().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to