I have develop an application that have functionality of google cloud messaging so i am used latest google play service and as development tool is android studio so i get code for gcm from android developer site http://developer.android.com/google/gcm/client.html and then i checked google play services available or not on start up of application
public boolean checkPlayServices(Activity activity) {
int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);
if (resultCode != ConnectionResult.SUCCESS) {
if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {
GooglePlayServicesUtil.getErrorDialog(resultCode, activity,
PLAY_SERVICES_RESOLUTION_REQUEST).show();
} else {
activity.finish();
}
return false;
}
return true;
}
but it always return this message "This app wont run unless you update Google play services