Checking Google Play services Availability
@Override
protected void onResume() {
checkGooglePlayServicesAvailability();
super.onResume();
}
public void checkGooglePlayServicesAvailability() {
int statusCode = GooglePlayServicesUtil
.isGooglePlayServicesAvailable(this);
if (statusCode == ConnectionResult.SUCCESS) {
Log.d("Is Google Play services available?", "" + statusCode);
} else {
GooglePlayServicesUtil.getErrorDialog(statusCode, this, 0).show();
}
}
Written by Enrique Diaz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Android
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#