예제 #1
0
        private void Initialization()
        {
            var response = AN_GoogleApiAvailability.IsGooglePlayServicesAvailable();

            if (response == AN_ConnectionResult.SUCCESS)
            {
                IsGoogleApiAvailable = true;
                Debug.Log("Google APIs are available.");
            }
            else
            {
                Debug.Log("Google Api not available on current device, trying to resolve");
                AN_GoogleApiAvailability.MakeGooglePlayServicesAvailable(result =>
                {
                    if (result.IsSucceeded)
                    {
                        IsGoogleApiAvailable = true;
                        Debug.Log("Google APIs are now available.");
                    }
                    else
                    {
                        IsGoogleApiAvailable = false;
                    }
                });
            }

            //check prefs for ignore signin
            _isSigninIgnored = PlayerPrefs.GetInt("IsSigninIgnored", 0) > 0;
        }
예제 #2
0
        public override void Test()
        {
            int responce = AN_GoogleApiAvailability.IsGooglePlayServicesAvailable();

            if (responce == AN_ConnectionResult.SUCCESS)
            {
                SetResult(SA_TestResult.OK);
            }
            else
            {
                AN_Logger.Log("Google Api not avaliable on current device, trying to resolve");
                AN_GoogleApiAvailability.MakeGooglePlayServicesAvailable((result) => {
                    if (result.IsSucceeded)
                    {
                        SetResult(SA_TestResult.OK);
                    }
                    else
                    {
                        SetResult(SA_TestResult.WithError("Google Api not avaliable on current device"));
                    }
                });
            }
        }