All Projects → Skullper → SimpleLocationGetter

Skullper / SimpleLocationGetter

Licence: Apache-2.0 license
No description or website provided.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to SimpleLocationGetter

EasyWayLocation
This library contain all utils related to google location. like, getting lat or long, Address and Location Setting dialog, many more...
Stars: ✭ 142 (+576.19%)
Mutual labels:  location, location-services
XamarinForms.LocationService
Xamarin Background Services, Background Location Updates, Location Updates, BroadCastReceiver
Stars: ✭ 61 (+190.48%)
Mutual labels:  location, location-services
iOS-MapKit-Tutorial
iOS MapKit Getting Started
Stars: ✭ 24 (+14.29%)
Mutual labels:  location, location-services
bdapis
Rest API service. Build with NodeJS, Express, MongoDB
Stars: ✭ 65 (+209.52%)
Mutual labels:  location, location-services
Openlocate Android
Stars: ✭ 136 (+547.62%)
Mutual labels:  location, location-services
react-native-device-country
Get device location by telephony (SIM card) or settings without using GPS tracker.
Stars: ✭ 33 (+57.14%)
Mutual labels:  location, gps-location
Rxlocation
🗺 [DEPRECATED] Reactive Location APIs Library for Android and RxJava 2
Stars: ✭ 503 (+2295.24%)
Mutual labels:  location, location-services
pinpoint
🌎 A python script for finding your Mac.
Stars: ✭ 56 (+166.67%)
Mutual labels:  location, location-services
Placepicker
Free Android Map Place Picker alternative using Geocoder instead of Google APIs
Stars: ✭ 126 (+500%)
Mutual labels:  location, location-services
Hrcarmarkeranimation
This android library is helpful for google map marker animation with Smooth turn and movement.
Stars: ✭ 52 (+147.62%)
Mutual labels:  location, location-services
aic-mobile-ios
Art Institute of Chicago Official Mobile App
Stars: ✭ 29 (+38.1%)
Mutual labels:  location, location-services
React Native Android Location Services Dialog Box
React Native Android Location Services Dialog Box
Stars: ✭ 175 (+733.33%)
Mutual labels:  location, location-services
surger
⚡ Is there surge pricing around me right now?
Stars: ✭ 20 (-4.76%)
Mutual labels:  location, location-services
ReminderPro
ReminderPro(location, note, voice recording)
Stars: ✭ 27 (+28.57%)
Mutual labels:  location, location-services
location-api-sl
This API can be use to all developers to get location details of Sri Lanka 🇱🇰 including major cities, sub areas, districts and Provinces. ⛳️
Stars: ✭ 35 (+66.67%)
Mutual labels:  location, location-services
Lost
A drop-in replacement for Google Play services location APIs for Android
Stars: ✭ 327 (+1457.14%)
Mutual labels:  location, location-services
android
Where you can find everything Android from Mapzen
Stars: ✭ 106 (+404.76%)
Mutual labels:  location, location-services
Live App Android
Build live location sharing in your Android app
Stars: ✭ 681 (+3142.86%)
Mutual labels:  location, location-services
Corelocationcli
Command line program to print location information from CoreLocation
Stars: ✭ 138 (+557.14%)
Mutual labels:  location, location-services
FusedBulb
Location fetch library.
Stars: ✭ 22 (+4.76%)
Mutual labels:  location, gps-location

SimpleLocationGetter

Very simple way to get last known location.

This library is just a wrap on newly released Location API: https://android-developers.googleblog.com/2017/06/reduce-friction-with-new-location-apis.html

Getting started

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

//Project build.gradle
allprojects {
    repositories {
        jcenter()
        maven {
            url  "http://dl.bintray.com/skullper/maven"
        }
    }
}
//app(module) build.gradle
compile 'com.github.skullper:locationgetter:0.1@aar'
compile 'com.google.android.gms:play-services-location:11.0.1'

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

SimpleLocationGetter getter = new SimpleLocationGetter(this, this);
getter.getLastLocation();

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

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

@Override
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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].