| com.google.android.gms.appstate.OnStateLoadedListener |
Listener for receiving callbacks when app state data has been loaded.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Called when a conflict is detected while loading app state.
| |||||||||||
Called when app state data has been loaded.
| |||||||||||
Called when a conflict is detected while loading app state. To resolve the conflict, call
resolveState(OnStateLoadedListener, int, String, byte[]) with the new
desired data and the value of resolvedVersion provided here.
| stateKey | The state key for the data needing resolution. |
|---|---|
| resolvedVersion | Version token to pass for resolution. |
| localData | Byte array containing the data that was saved locally on the device. |
| serverData | Byte array containing the latest known data from the server, which was different from the local data. |
Called when app state data has been loaded. Possible status codes include:
STATUS_OK if data was successfully loaded and is up-to-date.STATUS_NETWORK_ERROR_NO_DATA if the device was unable to
communicate with the network and has no local data available.STATUS_NETWORK_ERROR_STALE_DATA if the device was unable to
retrieve the latest data from the network.STATUS_CLIENT_RECONNECT_REQUIRED if the AppStateClient
needs to reconnect to the service to access this data.STATUS_INTERNAL_ERROR if an unexpected error occurred in the
service.STATUS_STATE_KEY_NOT_FOUND if the requested state key is not found
on the server.STATUS_STATE_KEY_LIMIT_EXCEEDED if the application already has
data present in the maximum number of state keys.| statusCode | A status code indicating the result of the operation. |
|---|---|
| stateKey | The state key for the data that was loaded, if available. |
| localData | Byte array containing the bytes of the requested app state, if available. |