EasyLocation

Additional

Language
Kotlin
Version
0.1.1 (Dec 30, 2019)
Created
Dec 22, 2019
Updated
Dec 30, 2019 (Retired)
Owner
robinkrsingh
Contributor
robinkrsingh
1
Activity
Badge
Generate
Download
Source code

Advertisement

EasyLocation

Location library to fetch location and location updates very easily. It handles location setting and permission by itself.

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
 repositories {
  ...
  maven { url 'https://jitpack.io' }
 }
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.robinkrsingh:easylocation:0.1.0'

Example:

 EasyLocation(this@MainActivity, object: EasyLocation.EasyLocationCallBack{
        override fun permissionDenied() {

            Log.i("Location", "permission  denied")
       

        }

        override fun locationSettingFailed() {

            Log.i("Location", "setting failed")
           

        }

        override fun getLocation(location: Location) {

            Log.i("Location_lat_lng"," latitude ${location?.latitude} longitude ${location?.longitude}")

            

        }
    })