With the help of link1 and link2, I've successfully created poc for geofencing. Everything was fine with/without wifi(GPS is always enabled on app launch) untill one day I found "unfortunately google play services has stopped".
So I tried to force stop, clear cache and also now clear data of Google Play Services. Then after geofence is not triggering without wifi. I've also tried increasing radius up to 1000m, but no success. Location is the very same building of my office and yes I've also tried with going out in open sky.
And now twist is that a very same implementation is working on other devices. So I'm very sure that it has to do with force stop of google play services. Solution I want is to restart the google play services or is there any other reason behind this.
Device : Samsung Galaxy Grand Quattro(GT-I8552)
Andriod Version : 4.1.2
Google Play Services : 7.5.74(1997312-034)
Google Play Store : 5.6.8
You shouldn't have cleared the data of Google Play Services as registered geofences are kept in the com.google.process.location process owned by the com.google.android.gms package. Now your app must re-register geofences. Please remember that the system restores geofences even if the Google Play Services is killed+restarted/upgraded but not if you clear its data. The same is also mentioned in the link1 that you referenced under the section "Re-register geofences only when required"
Related
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.
So I'm working in an app I didn't started and there's this "google play services check". In the last version I uploaded (with some minor bug fixes not related with the google play services check), the app asks to update the play services, this doesn't happens in latests versions of the app, only in the last one, regardless the device. Anyone could tell what can be the cause of this? And, what happens if I decide to not update the play services? Does some service stop working?
PS: I would like to remark that NOTHING related to the google play services check has been changed, NOTHING.
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.
I am creating an app where I need to analyse spector of my signal. And when this service is on I got some filtered HZs, When I stop this service everything is ok.
In my app I need to disable Google play services by code when my app runs.
Is there any idea how can disable the services (Force Stop) by code ?
Your code is not allowed to force a stop of Google Play services by design and by contract. You can connect and disconnect your own clients at-will, but other apps on the device may be using the services and you are not allowed to interfere with them.
What services on the phone are you using that you suspect Google Play services is interfering with?
According to the android documentation: The GoogleApiClient class is The main entry point for Google Play services integration.
So in order to disable Google Play Services functionality. Try calling GoogleApiClient.disconnect(); on your GoogleApiClient object.
Hopefully that should work.
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