AppStateClient reconnect - 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 reconnect method.

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
reconnect Method Overview
Closes the current connection to Google Play services and creates a new connection.
See Code Examples for other Android AppStateClient Methods: