Alternatives To Airlocation
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Android Reactivelocation2,11711713 years ago11September 29, 201732Java
Small library that wraps Google Play Service API in brilliant RxJava Observables reducing boilerplate to minimum.
Rxgps309
4 years ago6apache-2.0Java
Finding current location cannot be easier on Android !
Airlocation251
2 years agoKotlin
Rxlocationmanager115
5 years ago5mitKotlin
RxJava wrap around standard Android LocationManager without Google Play Services
Lubmerjack Automation102
2 years ago1Python
The code which plays LumberJack game for you
Android Easylocation97
5 years ago5apache-2.0Java
Google play service - location services wrapper
Cordova Plugin Request Location Accuracy924524 years ago12May 21, 20192Java
Cordova/Phonegap plugin for Android and iOS to request enabling/changing of Location Services by triggering a native dialog
Android Location Example60
8 years ago1mitJava
Project files for a blog post about the basics of using location in Android via Google Play Services
Android Location Example Refactored55
8 years ago2Java
Alternate project files for a blog post about the basics of using location in Android via Google Play Services
Locationestimatr.github.io32
3 years ago1JavaScript
This is a game where you are put anywhere on earth, and you have to figure out where you are
Alternatives To Airlocation
Select To Compare


Alternative Project Comparisons
Readme

AirLocation

PayPal donate button Android CI

An android library to simplify the usage of Google Play services location APIs, to get the user's most precise live location via a callback!

Jump to Setup or Usage

alt text

Features:

  • The location is precise up to 7 decimal places
  • Choose to get user's location just one-time, or continue getting live updates
  • The library takes care of a host of redundant checks and tasks like:
    • Declaring the location permissions in the Manifest file
    • Adding the Google Play services location APIs library dependency in Gradle
    • Checking if Google Play services are available and up to date or not
      • If not, requesting the user to update it, along with providing an option to do so
    • Checking if location permissions are available or not
      • If not, requesting the user at runtime to grant the permissions
      • Also checking if the permissions are permanently disabled by the user
        • If so, taking the user to the app's settings page and requesting to manually grant the permissions.
    • Checking if the device hardware settings are optimized or not (GPS is on, Wifi is on, etc)
      • If not, requesting the user to grant permission to change settings automatically
  • Uses only Google Play services location APIs internally - so you're in safe hands
  • Simple plug and play design
  • Extremely lightweight library (~50KB)
  • Written in Kotlin (with full Java support)
  • Android 10+ compatible (gets user's location via foreground location access, i.e., the activity requesting the location must be visible to the user to continue receiving location updates)
  • Takes care of the activity lifecycle

Screenshots

Setup

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

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

Add this line in your app build.gradle:

    dependencies {
      implementation 'com.github.mumayank:AirLocation:LATEST_VERSION' // this line
    }

where LATEST_VERSION is

Usage

  1. Define airLocation
  2. To start receiving live location, call airLocation.start()
  3. Override onActivityResult and call airLocation.onActivityResult()
  4. Override onRequestPermissionsResult and call airLocation.onRequestPermissionsResult()

Example:

    class MainActivity : AppCompatActivity() {

        private val airLocation = AirLocation(this, object : AirLocation.Callback {  

            override fun onSuccess(locations: ArrayList<Location>) {  
                // do something 
                // the entire track is sent in locations
            }  

            override fun onFailure(locationFailedEnum: AirLocation.LocationFailedEnum) {  
                // do something 
                // the reason for failure is given in locationFailedEnum
            }  

        })

        override fun onCreate(savedInstanceState: Bundle?) {
            ...
            airLocation.start() // CALL .start() WHEN YOU ARE READY TO RECEIVE LOCATION UPDATES
        }

        override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
            super.onActivityResult(requestCode, resultCode, data)
            airLocation.onActivityResult(requestCode, resultCode, data) // ADD THIS LINE INSIDE onActivityResult
        }

        override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
            super.onRequestPermissionsResult(requestCode, permissions, grantResults)
            airLocation.onRequestPermissionsResult(requestCode, permissions, grantResults) // ADD THIS LINE INSIDE onRequestPermissionResult
        }

    }
  • In some cases, you'd want to just get user's live location once. In such a case, simply pass true as the value of the parameter isLocationRequiredOnlyOneTime:
    private val airLocation = AirLocation(this, object : AirLocation.Callback {  
        override fun onSuccess(locations: ArrayList<Location>) {  }  
        override fun onFailure(locationFailedEnum: AirLocation.LocationFailedEnum) {  }  
    }, true) // NOTE HERE: PASS true TO JUST GET USER'S LIVE LOCATION ONCE

Thank you!

If you love the library, or it has helped you in any way, please give it a star! I'd really appreciate it!

Post your feature requests/ pull requests/ bug reports in the appropriate section of this repository.

Thank you :)

Popular Play Framework Projects
Popular Location Projects
Popular Frameworks Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Kotlin
Play Framework
Location
Permission