EasyLocationFetch

General

Category
Free
Tag
Location
License
MIT License
Min SDK
24 (Android 7.0 Nougat)
Registered
Dec 4, 2020
Favorites
3
Link
https://github.com/anirudhmpai/EasyLocationFetch
See also
RxGeoFence
GPSTracker
RxGps
CoLocation
MockCheck

Additional

Language
Java
Version
2.1.1 (Dec 3, 2020)
Created
Dec 3, 2020
Updated
Mar 7, 2022
Owner
Anirudh M Pai (anirudhmpai)
Contributors
WhiteSource Renovate (renovate-bot)
Anirudh M Pai (anirudhmpai)
2
Activity
Badge
Generate
Download
Source code
APK file

Show card

EasyLocationFetch

Setup

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

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

Step 2. Add this to gradle

android {

    ...
    compileOptions {
 sourceCompatibility JavaVersion.VERSION_1_8
 targetCompatibility JavaVersion.VERSION_1_8
    }
}
dependencies {
        implementation 'com.github.anirudhmpai:EasyLocationFetch:2.1.1'
}

Implementation :

Method 1. this uses googles api alongside internal providers(works better in all scenarios)

GeoLocationModel geoLocationModel = new EasyLocationFetch(context,GoogleApiKey).getLocationData();

Method 2. uses builtin providers

GeoLocationModel geoLocationModel = new EasyLocationFetch(context).getLocationData();

Different data items you can call from above model

geoLocationModel.getAddress()
geoLocationModel.getCity()
geoLocationModel.getLattitude()
geoLocationModel.getLongitude()