Code example for AppStateClient

Methods: isConnected, reconnect

0
                && 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 
        // retrieval.