Android: GCM without Google Account? - android

We're building an app that relies on Google Cloud Messaging to recieve data. The app will be installed on several tablets, that each should collect different data from our server. When trying the register our test tablet with our GCM server-side, we get the error "Google Play Services out of date. Requires 3265100 but found 3027105".
We have not attached the device to a Google account, since our understanding was that if you are running 4.0.4 or higher you do not need this. We're running 4.2.2 on an Acer Iconia A1. We really don't want to attach an account to each tablet (could possible be hundreds of them).
How do we update Google Play Services, or do we even need it?
Thanks in advance

If you are using GCM from the google play service library yes you need a google account because google play services gets updated through the play store.
you can however not use google play services and just download the GCM library from the SDK Manager but its not going to get updated anymore so if there are any bugs or anything they wont be fixed. all the new updated will go into the Google Play Services

Related

Can same application use for Huawei AppGallery without any changes?

We received news from Google, that play store will no longer sho win Huawei.
Huawei has come up with another store called AppGallery . The question is, can same apk upload to Huawei AppGallery and the other still active in Play Store ?
It's possible to upload the same APK file to both Google Play Store and HUAWEI AppGallery. But if your app uses GMS features like Google Sign-In or Firebase Cloud Messaging, it won't work well on the devices that don't have GMS, like Mate 30, P40, and any other new devices. Huawei app reviewers won't set it visible on HUAWEI AppGallery.
It's recommended that you use GMS if a device supports GMS; otherwise, use HMS (Huawei Mobile Services).
Please refer to the following links:
To check whether GMS is available.
HMS Overview
An annoying challenge arises on devices where both Play Store and Huawei AppGallery are installed. I distribute the same app with the same signature, but different mechanisms for purchasing access to premium functionality. If a user has installed the app from Play Store, and has acquired an in-app purchase, unfortunately the AppGallery updates the app also for this user, thus making him loose the purchase.
You can use absolutely the same *.apk (not *.aab).
The only problem (at least for us) is the absence google services =( So if you use pushes or remote config or smt like this it might be a problem.
When it comes to firebase you can check services which require google services here

Can't connect to google play service

I had an android application working fine in all average smartphones, but only one client is using a custom phone from Huawei, he received this error Can't connect to google play service, and also Google Maps not working, so my question there's any way programmatically to send a request to download the missed google play service ?
You can't install Google Play Services like a normal application, since it isn't a normal application. It's actually at least 3.
It needs to be a system app (ie in /system/priv-app/) to work, and relies on certain other frameworks that can't simply be installed.
If this user is rooted, tell them to flash Google Play Services from something like OpenGApps or MicroG. Otherwise, if you need people without Google Services to use your app, you need to find another maps API that isn't from Google.

Google Play Services availability and Google Play

We developed an application that uses the Google Play Services extension.
I assume that people without Google Play Services installed on their device side will not be able to use these services.
However if people does not have Google Play Services installed on their device, they probably cannot download it in the first place, because they dont have Google Play App itself.
So is it safe to assume that most people who install the app have Google Play Service installed and make a more general verification in our app for other rare cases?
For example, check if Google Play Services availability and if not installed, simply write a message and exit the app.
What is your opinion on that ?
Thanks
One of the things that can happen is that Google Play Services is present on the device, but not up to date. Or the user could have disabled Google Play Services. In both these cases connection to Google Play Services will fail, so you really have to check for it, no excuses :)
The answer can be found on Android's developers website
Important: Because it is hard to anticipate the state of each device, you must always check for a compatible Google Play services APK before you access Google Play services features. For many apps, the best time to check is during the onResume() method of the main activity.

Is it possible to get a GCM registration Id assigned to an Android device that isn't activated?

I am trying to make an app that would require two devices to communicate and am using two Android devices, one activated with Verizon, while the other is not activated. I am running code that gets a GCM registration id which successfully retrieves one on the activated device but does not do so on the other device. I assumed that an internet connection would be enough to qualify a device to receive a GCM registration id but it appears not to be the case. Can anyone please clarify this for me (and/or perhaps point me to something I might have failed to find online)?
Thanks!
GCM is a Google Play service; it requires that both the Google Play APK and the Google Play services APK are installed on the device:
http://developer.android.com/google/play-services/setup.html#ensure
It's also helpful to add a quick check in your code to verify that the user has Google Play Services installed. Check out Google's explanation of it (with sample code):
http://developer.android.com/google/gcm/client.html#sample-play
It requires devices running Android 2.2 or higher that also have the Google Play Store application installed, or or an emulator running Android 2.2 with Google APIs. However, you are not limited to deploying your Android applications through Google Play Store.
It uses an existing connection for Google services. For pre-3.0 devices, this requires users to set up their Google account on their mobile devices. A Google account is not a requirement on devices running Android 4.0.4 or higher.
Source: http://developer.android.com/google/gcm/gcm.html

GCM services query

I am using GCM services for my application to recieve data from the cloud.
Unfortnately, GCM does not respond or device does not recieve any commands from GCM if the GOOGLE play is not signed in , on the device ?
IS GOOGLE PLAY SIGN UP compulsory to recieve GCM ?
Also if through my application i need to find whether device is SIGN into GOOGLE PLAY
IS it available ?
Any help would be accepted >> THANKS IN ADVANCE
This is explained in the GCM Architectural Overview here are the two points that are important:
It requires devices running Android 2.2 or higher that also have the
Google Play Store application installed, or or an emulator running
Android 2.2 with Google APIs. However, you are not limited to
deploying your Android applications through Google Play Store.
It uses an existing connection for Google services. For pre-3.0
devices, this requires users to set up their Google account on their
mobile devices. A Google account is not a requirement on devices
running Android 4.0.4 or higher.
So if the device is running 4.0.4 or higher a Google account is not needed.
No Google play sign up is not compulsory to receive GCM. But remember if you are testing on emulator make sure it is GOOGLE API and not android. You can find a step by step guide to implement GCM using emulator and PHP here

Categories

Resources