Ejemplo n.º 1
0
    //this method will be automatically called when check is complete
    private void CompleteMethod(ConnectionResult connectionResult)
    {
        //if connection result is "Working" user has Internet access not just his card enabled
        if (connectionResult == ConnectionResult.Working)
        {
            result.text = "Network connection is available";
        }
        else
        {
            result.text = "Network is not reachable";
        }

        //this will tell you more details about the connection
        message.text = connectionResult.ToString();
    }
Ejemplo n.º 2
0
        public override void onConnectionFailed(ConnectionResult result)
        {
            if (!mGoogleIntentInProgress)
            {
                /* Store the ConnectionResult so that we can use it later when the user clicks on the Google+ login button */
                mGoogleConnectionResult = result;

                if (mGoogleLoginClicked)
                {
                    /* The user has already clicked login so we attempt to resolve all errors until the user is signed in,
                     * or they cancel. */
                    resolveSignInError();
                }
                else
                {
                    Log.e(TAG, result.ToString());
                }
            }
        }
Ejemplo n.º 3
0
        private static eLoginEnum Connect(String AUserName, String APassword, Int64 ASiteKey)
        {
            eLoginEnum ConnectionResult;
            String     WelcomeMessage;
            String     LoginError;
            Int32      ProcessID;
            Boolean    SystemEnabled;

            TLogging.Log("connecting UserId: " + AUserName + " to Server...");
            ConnectionResult = ((TConnectionManagement)TConnectionManagement.GConnectionManagement).ConnectToServer(
                AUserName.ToUpper(), APassword,
                out ProcessID,
                out WelcomeMessage,
                out SystemEnabled,
                out LoginError);

            if (ConnectionResult != eLoginEnum.eLoginSucceeded)
            {
                TLogging.Log("Connection to PetraServer failed! ConnectionResult: " + ConnectionResult.ToString() + " Error: " + LoginError);
                return(ConnectionResult);
            }

            TUserDefaults.InitUserDefaults();
            new TServerInfo(Utilities.DetermineExecutingOS());
            TLogging.Log(
                "client is connected ClientID: " + TConnectionManagement.GConnectionManagement.ClientID.ToString() + " UserId: " + AUserName +
                " to Server...");

            return(eLoginEnum.eLoginSucceeded);
        }