Re: [android-developers] Re: FusedLocation Provider fail
I've found an answer to one of the mysteries. mGoogleApiClient = new Builder(this) .addConnectionCallbacks(this) .addApi(LocationServices.API) //.addApi(Wearable.API) // used for data layer AP .addOnConnectionFailedListener(this) .build(); If you request the wearable api, it might say that the client is available, yet fail trying to connect, asynchronously, with unknown error 16. My local test devices all had the Android Wear app installed even though no wearable has ever been paired with them. Presumably, many of the end user devices, and the devices in my remote test lab, do not. Probable solution is to use one client per API if some are optional. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: FusedLocation Provider fail
Now is a good time to chime in if someone, like Google, wants to defend the Google Location Services. I don't see any advantage of it over location manager. None. And that comes form someone who knows that Location Manager hasn't been flawless either. But take all its flaws and add a heavyweight wrapper class, and you now have Google Location Services. And now you have several more ways it can fail. The Google Play Services could be unavailable, not have the right version, or not connect. It doesn't let me *not* worry about which provider is actually being used. To use the GPS at all, I have to specify PRIORITY_HIGH_ACCURACY even if I don't need high accuracy. Recent location, in the real world, is often null. Requesting location updates, in the real world, often fails to have any error messages but never yields a location. And it won't work on non Google Play devices, and Google gets to track more users. Both of those things may be an advantage to Google but not to me. Nathan On Sunday, January 18, 2015 at 10:48:24 PM UTC-8, Mukesh Srivastav wrote: Hi Nathan, I am in the same situation, I have my app where in there are 3000 drivers are using and in 20% of cases are getting failed (No locations,location was getting very far(200 miles... :( Here is the approach. I was using google play store location which is not at all reliable solution to use it, later on,i have switched to the actual location provider api's to get the lat and long. I had put lots of checks like the first priority is gps, if that fails use network, if that fails use passive and in all i was also checking if the location is the same as last, then again loop through the location api (making it null and creating the provider instance again) and try to get the new location. Now the situation is under control and the failures are like only 5%,though i am still exploring the other areas to get the right data. On Sun, Jan 18, 2015 at 4:01 AM, Nathan nathan@gmail.com javascript: wrote: OK, this is really getting ridiculous. Google Play Location Provider just isn't reliable. Only once in a great while can I even get a location. I'm not sure how I did it. I can't find any combination of settings that is reliable. Device Only mode has never worked except perhaps once. GPS was never activated as far as I can tell. getLastLocation() states If a location is not available, which should happen very rarely, null will be returned. The best accuracy available while respecting the location permissions will be returned. Not true. Seems pretty common for me and is happening a lot for end users as well. Not such a big deal if one could ask for the location and expect to get it. Still nowhere is documented what settings the user has to have for me to get location through Google Play Services. So far the promise of the FusedLocationProvider is coming short bigtime. I'm close to crawling back to the supposedly inferior LocationManager. Nathan -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: FusedLocation Provider fail
Hi Nathan, I am in the same situation, I have my app where in there are 3000 drivers are using and in 20% of cases are getting failed (No locations,location was getting very far(200 miles... :( Here is the approach. I was using google play store location which is not at all reliable solution to use it, later on,i have switched to the actual location provider api's to get the lat and long. I had put lots of checks like the first priority is gps, if that fails use network, if that fails use passive and in all i was also checking if the location is the same as last, then again loop through the location api (making it null and creating the provider instance again) and try to get the new location. Now the situation is under control and the failures are like only 5%,though i am still exploring the other areas to get the right data. On Sun, Jan 18, 2015 at 4:01 AM, Nathan nathan.d.mel...@gmail.com wrote: OK, this is really getting ridiculous. Google Play Location Provider just isn't reliable. Only once in a great while can I even get a location. I'm not sure how I did it. I can't find any combination of settings that is reliable. Device Only mode has never worked except perhaps once. GPS was never activated as far as I can tell. getLastLocation() states If a location is not available, which should happen very rarely, null will be returned. The best accuracy available while respecting the location permissions will be returned. Not true. Seems pretty common for me and is happening a lot for end users as well. Not such a big deal if one could ask for the location and expect to get it. Still nowhere is documented what settings the user has to have for me to get location through Google Play Services. So far the promise of the FusedLocationProvider is coming short bigtime. I'm close to crawling back to the supposedly inferior LocationManager. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: FusedLocation Provider fail
OK, this is really getting ridiculous. Google Play Location Provider just isn't reliable. Only once in a great while can I even get a location. I'm not sure how I did it. I can't find any combination of settings that is reliable. Device Only mode has never worked except perhaps once. GPS was never activated as far as I can tell. getLastLocation() states If a location is not available, which should happen very rarely, null will be returned. The best accuracy available while respecting the location permissions will be returned. Not true. Seems pretty common for me and is happening a lot for end users as well. Not such a big deal if one could ask for the location and expect to get it. Still nowhere is documented what settings the user has to have for me to get location through Google Play Services. So far the promise of the FusedLocationProvider is coming short bigtime. I'm close to crawling back to the supposedly inferior LocationManager. Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.