This interface is deprecated.
Consider migrating to the games v2. Refer to the migration
guide.
A client to interact with games basic functionality.
Public Method Summary
abstract Task<Bundle> |
getActivationHint()
This method is deprecated. Consider migrating to the games v2. Refer to the
migration guide.
|
abstract Task<String> |
getAppId()
This method is deprecated. Consider migrating to the games v2. Refer to the
migration guide.
|
abstract Task<String> |
getCurrentAccountName()
This method is deprecated. Consider migrating to the games v2. Refer to the
migration guide.
|
abstract Task<Intent> |
getSettingsIntent()
This method is deprecated. Consider migrating to the games v2. Refer to the
migration guide.
|
abstract Task<Void> |
setGravityForPopups(int gravity)
This method is deprecated. Consider migrating to the games v2. Refer to the
migration guide.
|
abstract Task<Void> |
setViewForPopups(View
gamesContentView)
This method is deprecated. Consider migrating to the games v2. Refer to the
migration guide.
|
Public Methods
public abstract Task<Bundle> getActivationHint ()
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide.
Returns a Task
which
asynchronously loads a Bundle
that may
contain an information regarding to the previous user's action.
The Task
returned will not be null, but the Bundle
returned from the Task
may be null if it was already received or there is
no related data found.
Unless a new user action is performed all the subsequent calls will return a
Task
with a null Bundle
.
A Bundle
can contain the following keys:
SnapshotsClient.EXTRA_SNAPSHOT_METADATA
if the user wanted to resume a saved game. The value contained here is aSnapshotMetadata
object which can be accessed withBundle.getParcelable(String)
.
public abstract Task<String> getAppId ()
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide.
Returns a Task
which
asynchronously loads the application ID linked to this client instance.
public abstract Task<String> getCurrentAccountName ()
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide.
Returns a Task
which
asynchronously loads the name of the currently selected account. This is the account
the user has chosen to use for Google Play Games.
The returned Task
can fail with a RemoteException
.
Note that your app must have <uses-permission
android:name="android.permission.GET_ACCOUNTS" />
declared in your manifest
in order to use this method. Otherwise the Task
will fail with
SecurityException
.
public abstract Task<Intent> getSettingsIntent ()
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide.
Returns a Task
which
asynchronously loads an Intent
to
show the Settings screen that allows the user to configure Games-related features for
the current game. Note that this must be invoked with
Activity.startActivityForResult(Intent, int)
, so that the identity of the
calling package can be established.
The returned Task
can fail with a RemoteException
.
Most applications will not need to call this directly, since the Settings UI is already reachable from most other Games UI screens (achievements, leaderboards, etc.) via a menu item.
public abstract Task<Void> setGravityForPopups (int gravity)
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide.
Returns a Task
which
asynchronously sets the part of the screen at which games service pop-ups (for example,
"welcome back" or "achievement unlocked" popups) will be displayed using gravity.
Default value is Gravity.TOP
|Gravity.CENTER_HORIZONTAL
.
Parameters
gravity | The gravity which controls the placement of games service pop-ups. |
---|
public abstract Task<Void> setViewForPopups (View gamesContentView)
This method is deprecated.
Consider migrating to the games v2. Refer to the migration
guide.
Parameters
gamesContentView | The view to use as a content view for popups. View cannot be null. |
---|