Example #1
0
        /// <summary>
        /// Authenticate the local user with the Google Play Games service.
        /// </summary>
        /// <param name='callback'>
        /// The callback to call when authentication finishes. It will be called
        /// with <c>true</c> if authentication was successful, <c>false</c>
        /// otherwise.
        /// </param>
        /// <param name='silent'>
        /// Indicates whether authentication should be silent. If <c>false</c>,
        /// authentication may show popups and interact with the user to obtain
        /// authorization. If <c>true</c>, there will be no popups or interaction with
        /// the user, and the authentication will fail instead if such interaction
        /// is required. A typical pattern is to try silent authentication on startup
        /// and, if that fails, present the user with a "Sign in" button that then
        /// triggers normal (not silent) authentication.
        /// </param>
        public void Authenticate(Action <bool> callback, bool silent)
        {
            // make a platform-specific Play Games client
            if (mClient == null)
            {
                GooglePlayGames.OurUtils.Logger.d("Creating platform-specific Play Games client.");
                mClient = PlayGamesClientFactory.GetPlatformPlayGamesClient(mConfiguration);
            }

            // authenticate!
            mClient.Authenticate(callback, silent);
        }
Example #2
0
        /// <summary>
        /// Authenticate the local user with the Google Play Games service.
        /// </summary>
        /// <param name='unused'>
        /// Unused. For future compatibility, always pass <c>Social.localUser</c>.
        /// </param>
        /// <param name='callback'>
        /// The callback to call when authentication finishes. It will be called
        /// with <c>true</c> if authentication was successful, <c>false</c>
        /// otherwise.
        /// </param>
        /// <param name='silent'>
        /// Indicates whether authentication should be silent. If <c>false</c>,
        /// authentication may show popups and interact with the user to obtain
        /// authorization. If <c>true</c>, there will be no popups or interaction with
        /// the user, and the authentication will fail instead if such interaction
        /// is required. A typical pattern is to try silent authentication on startup
        /// and, if that fails, present the user with a "Sign in" button that then
        /// triggers normal (not silent) authentication.
        /// </param>
        public void Authenticate(ILocalUser unused, Action <bool> callback, bool silent)
        {
            // make a platform-specific Play Games client
            mClient = PlayGamesClientFactory.GetPlatformPlayGamesClient();

            // authenticate!
            mClient.Authenticate(callback, silent);
        }
 public void Authenticate(Action <bool, string> callback, bool silent)
 {
     if (mClient == null)
     {
         Logger.d("Creating platform-specific Play Games client.");
         mClient = PlayGamesClientFactory.GetPlatformPlayGamesClient(mConfiguration);
     }
     mClient.Authenticate(callback, silent);
 }
Example #4
0
    public void Authenticate(Action <bool> callback, bool silent)
    {
        // make a platform-specific Play Games client
        if (mClient == null)
        {
            Debug.Log("***Creating dummy platform-specific Play Games client.");
            mClient = new DummyPlayGamesClient();
        }

        // authenticate!
        mClient.Authenticate(callback, silent);
    }
        /// <summary>
        /// Authenticate the local user with the Google Play Games service.
        /// </summary>
        /// <param name='unused'>
        /// Unused. For future compatibility, always pass <c>Social.localUser</c>.
        /// </param>
        /// <param name='callback'>
        /// The callback to call when authentication finishes. It will be called
        /// with <c>true</c> if authentication was successful, <c>false</c>
        /// otherwise.
        /// </param>
        /// <param name='silent'>
        /// Indicates whether authentication should be silent. If <c>false</c>,
        /// authentication may show popups and interact with the user to obtain
        /// authorization. If <c>true</c>, there will be no popups or interaction with
        /// the user, and the authentication will fail instead if such interaction
        /// is required. A typical pattern is to try silent authentication on startup
        /// and, if that fails, present the user with a "Sign in" button that then
        /// triggers normal (not silent) authentication.
        /// </param>
        public void Authenticate(ILocalUser unused, Action<bool> callback, bool silent) {
            // make a platform-specific Play Games client
            mClient = PlayGamesClientFactory.GetPlatformPlayGamesClient();

            // authenticate!
            mClient.Authenticate(callback, silent);
        }