My app uses Google Cloud Messaging
and using the implementation code on the Android website, it checks if the Google Play Services APK
is installed or not:
// Check for Google Play Services APK. If success, proceed with GCM registration.
public void registerGcm() {
if (checkPlayServices()) {
mGcm = GoogleCloudMessaging.getInstance(mContext);
mGcmRegId = getRegistrationId(mContext);
if (mGcmRegId.isEmpty()) { new RegisterGCMTask().execute(); }
}
else {
Toast.makeText(mContext, "Google Play Services APK not found\n"
+ "Please download Google Play Services", Toast.LENGTH_LONG).show();
mActivity.finish();
}
}
Everything was working fine and checkPlayServices()
returned true before. But once I implemented v3 Google In-App Billing
as the instructions here , it stopped working and checkPlayServices()
started returning false.
Why is this happening? And has anyone else experienced similar problems? This error occurred after I upgrade Google Play Services.
I also getting this note in my Logcat as well:
08-19 13:12:39.730: W/GooglePlayServicesUtil(11708): Google Play services out of date. Requires 5089000 but found 5084036
Here are few links that may help you understand resolve the issue:
http://developer.android.com/google/play-services/setup.html#ensure
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.