Get Current location android with kotlin

Get Current location android with kotlin

Current Location Android

In this tutorial we will learn, How to Get Current Location Android with Kotlin or how to use LocationManager to get location in Kotlin. Getting location steps are given below.


LocationManager class provides access to the system location services.

In this tutorial, you will learn how to Get Current Location Android device. It use Google’s FusedLocationAPI for getting current location latitude and longitude.

Get current GPS location android with kotlin

Result After Demo:

get current location kotlin

get current location kotlin


Step 1.  Create  a new Android Studio project or File | New project 

if you dont aware much with Kotlin Please refer Get Started with kotlin. For Basic of Kotlin refer post Basics of Kotlin and Kotlin Operators.

Get Started with Kotlin on Android Teachers - 1


Step 2. In build.gradle(Module:app) 

Step 3.  Add permissions in AndroidManifest.xml

Step 4. activity_main.xml

Step 5. MainActivity.kt

Looking for more post on Kotlin Please Kotlin Posts

Result After Demo:

Get Current Location Android With Kotlin -1

Get Current Location Android With Kotlin -2

Hope you like this tutorial. I am trying to writing post on android and kotlin. need your supports to write batter tutorial

comment below if you have any problem to getting location with kotlin or java.

If you are looking for any tutorial must wirte to us. We will try to post ASAP. Send Request Contact Us.

5 thoughts on “Get Current location android with kotlin

  1. i try to use the code for get the current location in a search, but i have some problems with the imports cus i don’t know all of them(and u don’t include). it wil be so usefull if u can upload the sourcecode for better understanding.
    i find getting the lat and lng in android too complex for the task that is, i just wanna consult 2 values when someone press a button, why don’t exist someting like a funtion that just return the values :/


Leave a Comment