Search code examples
androidkotlingoogle-mapsgoogle-maps-api-3

Find my current location Kotlin in Android?


I want to find my current location using Google map Kotlin Android can anyone help me with this? If anyone has any sample Project or any repo please provide me the link.

Documentation code is too difficult for me. I'm a beginner.


Solution

  • It's right there in the documentation itself: https://developer.android.com/training/location/retrieve-current#last-known

    If you have the Location object which contains a lat and long you can move the Camera in Google Maps to that lat and long.

    https://developers.google.com/maps/documentation/android-sdk/views#moving_the_camera