AppStateClient isConnected - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for AppStateClient isConnected method.

This code example shows how to use the following methods:isConnected, loadState
 
  public static void loadState(int stateKey)
  { 
    try 
    { 
      if(appStateClient != null && appStateClient.isConnected())
      { 
        appStateClient.loadState(new GooglePlayCallback("APP_STATE_CLIENT"),
            stateKey);
 
        Log.i("trace", "Loading state: " + stateKey);
      } 
    } 
    catch(Exception e)
    { 
      handleException(e, "loadState");
    } 
  } 
 
  public static void updateState(int stateKey, String data)
5
CodeRank
This code example shows how to use the following methods:disconnect, isConnected
                && mPlusClient.isConnected()) {
            mConnectedClients &= ~CLIENT_PLUS;
            mPlusClient.disconnect();
        } 
        if ((whatClients & CLIENT_APPSTATE) != 0 && mAppStateClient != null
                && mAppStateClient.isConnected()) {
            mConnectedClients &= ~CLIENT_APPSTATE;
            mAppStateClient.disconnect();
        } 
    } 
	 
	public void onSignOutComplete() { 
		if (mGamesClient.isConnected())
            mGamesClient.disconnect();
		UnitySendMessageSafe("GPGAuthResult", "signedout"); 
	} 
 
	public void onConnectionFailed(ConnectionResult result) {
		// save connection result for later reference 
        mConnectionResult = result;
5
CodeRank
This code example shows how to use the following methods:disconnect, isConnected
This code example shows how to use the following methods:disconnect, isConnected
This code example shows how to use the following methods:disconnect, isConnected
This code example shows how to use the following methods:disconnect, isConnected
This code example shows how to use the following methods:disconnect, isConnected
This code example shows how to use the following methods:disconnect, isConnected
This code example shows how to use the following methods:isConnected, reconnect
                && mGamesClient.isConnected()) {
            mConnectedClients &= ~CLIENT_GAMES;
            mGamesClient.reconnect();
        } 
        if ((whatClients & CLIENT_APPSTATE) != 0 && mAppStateClient != null
                && mAppStateClient.isConnected()) {
            mConnectedClients &= ~CLIENT_APPSTATE;
            mAppStateClient.reconnect();
        } 
    } 
 
    /** Called when we successfully obtain a connection to a client. */ 
    @Override 
    public void onConnected(Bundle connectionHint) {
        debugLog("onConnected: connected! client=" + mClientCurrentlyConnecting);
         
        // Mark the current client as connected 
        mConnectedClients |= mClientCurrentlyConnecting;
         
        // If this was the games client and it came with an invite, store it for later 
5
CodeRank
This code example shows how to use the following methods:disconnect, isConnected
isConnected Method Overview
Checks if the client is currently connected to the service, so that requests to other methods will succeed.
See Code Examples for other Android AppStateClient Methods: