Visit GitHub Repo


Very simple way to get last known location.

This library is just a wrap on newly released Location API:

Getting started

This library will perfectly fit your existing build.gradle files:

//Project build.gradle
allprojects {
    repositories {
        maven {
            url  ""
//app(module) build.gradle
compile 'com.github.skullper:locationgetter:0.1@aar'
compile ''

Then you just need to add this two lines of code to get last known location:

SimpleLocationGetter getter = new SimpleLocationGetter(this, this);

Oh, and don't forget to implement this awesome well written listener to class where the previous strings are declared:

implements SimpleLocationGetter.OnLocationGetListener
public void onLocationReady(Location location){
	Log.d("LOCATION", "onLocationReady: lat="+location.getLatitude() + " lon="+location.getLongitude());

public void onError(String error){
	Log.e("LOCATION", "Error: "+error);

As you probably see in onLocationReady() method you'll get your location and if API cannot get location or you just forgot to turn on your GPS you'll get a exact description in onError() method

And that's all folks!

Nope, also you need to check permissions by yourself. Sorry for this, but it's a SIMPLE location getter.

Good luck|have fun

Learners From Our Courses Work At