Today I’m sharing you a working code on how to get the user’s current location in Android. There are many popular apps using this feature such as Google Maps and Facebook. Remember when you checked in a place?
Knowing exactly where your users are located is really cool, but you always have to let them know you are doing it. Asking permission to get user’s location is an ethical way.
One advantage of getting user’s current location is customizing their experience, just like what Twitter does. If you let twitter know your location, it will show top trends or news near you, how cool is that?