public interface

OnStateLoadedListener

com.google.android.gms.appstate.OnStateLoadedListener

Class Overview

Listener for receiving callbacks when app state data has been loaded.

Summary

Public Methods
abstract void onStateConflict(int stateKey, String resolvedVersion, byte[] localData, byte[] serverData)
Called when a conflict is detected while loading app state.
abstract void onStateLoaded(int statusCode, int stateKey, byte[] localData)
Called when app state data has been loaded.

Public Methods

public abstract void onStateConflict (int stateKey, String resolvedVersion, byte[] localData, byte[] serverData)

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.

Parameters
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.

public abstract void onStateLoaded (int statusCode, int stateKey, byte[] localData)

Called when app state data has been loaded. Possible status codes include:

Parameters
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.