Check for Play services

This commit is contained in:
M66B 2015-11-07 13:18:00 +01:00
parent 1aafeaddef
commit 0247b2c41e
1 changed files with 5 additions and 1 deletions

View File

@ -63,6 +63,8 @@ import android.widget.Toast;
import com.android.vending.billing.IInAppBillingService;
import com.google.android.gms.appinvite.AppInviteInvitation;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;
import org.json.JSONException;
import org.json.JSONObject;
@ -480,7 +482,9 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
}
});
if (!Util.hasValidFingerprint(TAG, this) || getIntentInvite(this).resolveActivity(getPackageManager()) == null)
if (!Util.hasValidFingerprint(TAG, this) ||
GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) != ConnectionResult.SUCCESS ||
getIntentInvite(this).resolveActivity(getPackageManager()) == null)
menu.removeItem(R.id.menu_invite);
if (getIntentSupport().resolveActivity(getPackageManager()) == null)