private bool TestIfGooglePlayServicesIsInstalled() { int queryResult = GooglePlayServicesUtil.IsGooglePlayServicesAvailable(this); if (queryResult == ConnectionResult.Success) { Log.Info(Tag, "Google Play Services is installed on this device."); return(true); } if (GooglePlayServicesUtil.IsUserRecoverableError(queryResult)) { string errorString = GooglePlayServicesUtil.GetErrorString(queryResult); Log.Error(Tag, "There is a problem with Google Play Services on this device: {0} - {1}", queryResult, errorString); Dialog errorDialog = GooglePlayServicesUtil.GetErrorDialog(queryResult, this, InstallGooglePlayServicesId); ErrorDialogFragment dialogFrag = new ErrorDialogFragment(errorDialog); dialogFrag.Show(FragmentManager, "GooglePlayServicesDialog"); } return(false); }
bool TestIfGooglePlayServicesIsInstalled() { var queryResult = GoogleApiAvailability.Instance.IsGooglePlayServicesAvailable(this); if (queryResult == ConnectionResult.Success) { Log.Info(Tag, "Google Play Services is installed on this device."); return(true); } if (GoogleApiAvailability.Instance.IsUserResolvableError(queryResult)) { var errorString = GoogleApiAvailability.Instance.GetErrorString(queryResult); Log.Error(Tag, "There is a problem with Google Play Services on this device: {0} - {1}", queryResult, errorString); var errorDialog = GoogleApiAvailability.Instance.GetErrorDialog(this, queryResult, InstallGooglePlayServicesId); var dialogFrag = new ErrorDialogFragment(errorDialog); dialogFrag.Show(FragmentManager, "GooglePlayServicesDialog"); } return(false); }
private bool TestIfGooglePlayServicesIsInstalled() { int queryResult = GooglePlayServicesUtil.IsGooglePlayServicesAvailable(this); if (queryResult == ConnectionResult.Success) { Log.Info(Tag, "Google Play Services is installed on this device."); return true; } if (GooglePlayServicesUtil.IsUserRecoverableError(queryResult)) { string errorString = GooglePlayServicesUtil.GetErrorString(queryResult); Log.Error(Tag, "There is a problem with Google Play Services on this device: {0} - {1}", queryResult, errorString); Dialog errorDialog = GooglePlayServicesUtil.GetErrorDialog(queryResult, this, InstallGooglePlayServicesId); ErrorDialogFragment dialogFrag = new ErrorDialogFragment(errorDialog); dialogFrag.Show(FragmentManager, "GooglePlayServicesDialog"); } return false; }