com.google.android.gms.games.snapshot.Snapshots.OpenSnapshotResult |
This interface is deprecated.
SnapshotsClient.DataOrConflict
is returned
instead in the SnapshotsClient
.
Result delivered when a snapshot has been opened.
Possible status codes include:
STATUS_OK
if data was successfully
loaded and is up-to-date.
STATUS_SNAPSHOT_NOT_FOUND
if the
snapshot could not be found on the server.
STATUS_SNAPSHOT_CREATION_FAILED
if
an error occurred while creating the snapshot.
STATUS_SNAPSHOT_CONFLICT
if a
conflict was detected during the open operation.
STATUS_SNAPSHOT_CONTENTS_UNAVAILABLE
if
the content for this snapshot could not be loaded. The metadata will still be valid for
the returned snapshot, but it must be re-opened to be modified.
STATUS_SNAPSHOT_FOLDER_UNAVAILABLE
if the root snapshot folder for this game could not be found or created.
STATUS_SNAPSHOT_CONFLICT_MISSING
if
a conflict was being resolved and the ID was not found.
STATUS_NETWORK_ERROR_NO_DATA
if the
device was unable to retrieve any data from the network and has no data cached locally.
STATUS_CLIENT_RECONNECT_REQUIRED
if
the client needs to reconnect to the service to access this data.
STATUS_LICENSE_CHECK_FAILED
if the
game is not licensed to the user.
STATUS_INTERNAL_ERROR
if an
unexpected error occurred in the service.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves the ID of the conflict to resolve, if any.
| |||||||||||
Retrieves the modified version of this snapshot in the case of a conflict.
| |||||||||||
Retrieve the
SnapshotContents object used to update the data in case of a conflict. | |||||||||||
Retrieves the snapshot that was opened.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Retrieves the ID of the conflict to resolve, if any. Pass this to resolveConflict(GoogleApiClient, String, Snapshot)
when resolving the conflict. Will return null if the status of
this operation is not STATUS_SNAPSHOT_CONFLICT
.
Returns | |
---|---|
String |
The ID of the conflict to resolve, or null if there was no conflict. |
Retrieves the modified version of this snapshot in the case of a conflict. This version may
differ from the values returned in getSnapshot()
, and may need to be merged. Will
return null if the status of this operation is not STATUS_SNAPSHOT_CONFLICT
.
Returns | |
---|---|
Snapshot |
The modified snapshot data, or null if there was no conflict. |
Retrieve the SnapshotContents
object used to update the data in case of a conflict.
Pass this to resolveConflict(GoogleApiClient, String, String, SnapshotMetadataChange, SnapshotContents)
to resolve this conflict.
Will return null if the status of this operation is not STATUS_SNAPSHOT_CONFLICT
.
Returns | |
---|---|
SnapshotContents |
A SnapshotContents object to use to write resolved snapshot data, or null if
there was no conflict.
|
Retrieves the snapshot that was opened. This is always the device's most up-to-date view of
the snapshot data. If getStatus()
is STATUS_SNAPSHOT_CONFLICT
, the return value
here represents the state of the snapshot on the server.
Returns | |
---|---|
Snapshot |
The snapshot that was opened, if any. This will be null if the open operation did not succeed. |