Is google play services app required for GCM to work? - android

I was trying to run the Google Cloud Messaging code on Eclipse. The Error SERVICE_NOT_AVAILABLE was coming on emulator and a tablet running 2.2.
So after looking on the internet for some time i included isGooglePlayServicesAvailable() check in my code which returned status code 1 meaning SERVICE_MISSING.
from developer.android.com docs i came to know this
To test your app when using the Google Play services SDK, you must use either:
A compatible Android device that runs Android 2.2 or higher and includes Google Play Store.
The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
So my question is that for registering an android 2.2 device which has a Google Play app, is Google play services required as well?
Since my tablet is running on android 2.2 with a google play app but no google play services and the emulator i was running was less than 4.2.2, is this the reason that GCM was giving an error of SERVICE_NOT_AVAILABLE.
I didn't see any other error in Logcat as well.
Any help would be appreciated.
Thanks

So my question is that for registering an android 2.2 device which has a Google Play app, is Google play services required as well?
If you are going to use GoogleCloudMessaging, my understanding is yes, you need Play Services. The older GCM API that does not use the GoogleCloudMessaging class should work on devices without Play Services, as it worked on such devices before Google I|O 2013, when there was no GoogleCloudMessaging class.

Related

run google play store on android emulator

I installed Google play store on my android emulator successfully. But when I try to run Google app it gives "Unfortunately, Google services framework has stopped" error message. I tried to fix it using clear cache of Google play store app, clear data of Google services framework app and restart the device. Also I tried for new emulators. But It didn't work. Does it a matter version of android sdk and Google Services Framework.apk version?
Suggest a way to fix this problem.
Read up on the guide provided by Android here.
Specifically, note:
To test your app when using the Google Play services SDK, you must use
either:
A compatible Android device that runs Android 2.3 or higher and
includes Google Play Store.
The Android emulator with an AVD that runs
the Google APIs platform based on Android 4.2.2 or higher.
As long as you satisfy those requirements, follow the installation instructions provided to install the SDK into your Developer environment.

my demo app of android for google map not working due to google play services showing error

Error shown on android emulator :
"Google Play services ,which some of your application rely on, is not
supported by your device. Please contact the manufacturer for
assistance"
I have generated the key required to add in manifest, installed google play services and added reference to my project. my AVD is android 4.2.2(17)
I have also installed google api for android 4.2.2(17)
but still it isn't working.
Google play services are not installed in the emulators. You have to manually install the APKs for the required services you want to run on the emulator.
and as an alternative you can use genymotion emulator, they are pretty fast and come with google play services.

Can we run an App with Google Map v2 on Emulator Running Android 4.3?

It is still not clear if we can test Google Map v2 on Android emulator or NOT.
It is all about Play Service and they "Google Android Team" have announced the following:
On Android-Developer Blog
They are saying
To simplify your testing, we've also released an updated Google APIs emulator image that includes Google Play Services 3.2. You can download the image through the Android SDK Manager.
On Android Developer Site They are saying
To test your app when using the Google Play services SDK, you must use either:
•A compatible Android device that runs Android 2.2 or higher and includes Google Play Store.
•The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.
But, I still not able to run the Map on Android Emulator with Google API 18 (4.3).
What is the right answer?
This wasn't possible initially, but it seems the new version of the google play services apk is making it possible.
Check out the answer here here
Unfortunately, I haven't been able to try it out myself.

SERVICE_VERSION_UPDATE_REQUIRED and Google play service out of date while integrating Google Plus in android

I have integrated Google Plus in Android App.I am using Android SDK version 4.2.2. But I got this error while performing sharing post on google plus :
Google Plus Service Out of date
and
ConnectionResult {statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null }
I want to run Google Plus Posting on emulator, not on device.
Any help will be appreciated.
I got this error simply because Google Play Services actually were out of date when running on the emulator. Apparently Google hasn't updated Google Play Services on "old" emulators (such as Android 4.2.2). Using the Google API 19 (Android 4.4) emulator works for me.
Should work with Android 4.2.2 and other when running on a physical device though (where Google Play Services on the device is actually updated).
Here's the issue thread regarding this problem: https://code.google.com/p/android/issues/detail?id=57880. The old emulators will likely not be updated.
Question by user:
Will the older API Level 17 be updated with a new Google Play services?
Project member answer:
Sorry, we're only committing to keeping the latest API up-to-date.

Status of Google Play Services 3.1

Android documentation here says new Google Cloud Messaging API requires Google Play services version 3.1 or higher on the device.
What is the status of implementation of this service?
Are all android devices updated with Google Play services version 3.1 or higher?
Since Google Play Services are automatically updated on devices via Google Play, the vast majority of devices are running the latest version. It updates whenever the user connects to the internet, without user interaction.
I can't seem to find any statistics on this, but I'm fairly sure that all 2.2 and above devices will be running the latest or penultimate version.

Categories

Resources