I realize this question has been asked many times before but I'm asking it now because the answers are quite old (compared to the new API).
I've used Location Manager before but I've found it very unreliable. For example in my app, using getLastKnownLocation and/or current location, it would instantly load with the camera on the user's current location. But say if I turned the location on my device right before I started my app, it wouldn't have the camera on the user's current location but rather somewhere near Nigera (default view, I believe).
Only if I used Google Maps app and pin pointed my location or if I waited some time, then my app would load with the user's location in the view (using moveCamera).
Sometimes it would work and sometimes it wouldn't. But I want to use Google Api Client, or perhaps something smoother, to retrieve the user's location.
I want to do it like this:
1.) If the user doesn't have their location on, prompt them to turn it on.
2.) After turning location on, start the Maps camera/view with the user's current location in the center.
3.) Finally, if the user decides to take off location or move from their location, do absolutely nothing.
I've read a lot of questions here but I can't find anything that could help me configure this functionality using Google Api Client or anything else. I've tried almost everything with Location Manager but I still can't get it to work smoothly. And out of frustration, I've deleted all my Location Manager code.
If you want to see what I had written down or tried, most of my sources came from this question (and related):
What is the simplest and most robust way to get the user's current location on Android?
Thank you for taking the time to read this.