The Android Arsenal – Location

The Android Arsenal – Location

April 26, 2021 0 By admin

Locus is a tiny kotlin library for android which makes it super very easy to retrieve location with just few lines of code. Everything including permission model and Location settings resolution is handled internally which removes a lot of boilerplate code any developer have to write every time.

See Wiki for more information and configuration!

Read blog here: The Legendary Task of Retrieving Location in Just 3 lines of code.


  • Android R support (Please report if any issue is found)
  • Completely written in Kotlin
  • Easy Initialization
  • Handles Permission Model
  • No Boilerplate
  • Built on Kotlin DSL
  • Manifest Permission Check
  • Life-Cycle Aware Location Updates
  • Location Settings Check
  • Location Settings Request
  • Custom Location Options Configuration
  • Custom Relation Dialog configuration
  • Custom Permission Blocked Dialog configuration

IMPORTANT: Deprecation from v3.2.0

Text Customizations using Locus.configure{} block is deprecated in v3.2.0. That means rationaleText, rationaleTitle, blockedTitle, blockedText, resolutionTitle, and resolutionText are deprecated. Migration would be to customize/override them from strings.xml.

It is deprecated in v3.2.0 and will be removed completely in next release.


Locus.configure {
    rationaleTitle = "Rationale Title"
    rationaleTitle = "This is a rationale message."
    blockedTitle = "Permission Blocked Title"
    blockedText = "This is a permission blocked message."
    resolutionTitle = "Permission Resolution Title"
    resolutionText = "This is a permission resolution message."



<string name="locus_rationale_title">Rationale Title</string>
<string name="locus_rationale_message">This is a rationale message.</string>
<string name="locus_permission_blocked_title">Permission Blocked Title</string>
<string name="locus_permission_blocked_message">This is a permission blocked message.</string>
<string name="locus_location_resolution_title">Permission Resolution Title</string>
<string name="locus_location_resolution_message">This is a permission resolution message.</string>

checkout strings.xml.

Gradle Dependency

  • Add the JitPack repository to your project’s build.gradle file
allprojects {
    repositories {
        maven { url '' }
  • Add the dependency in your app’s build.gradle file
dependencies {
    implementation 'com.github.BirjuVachhani:locus-android:latest-version'
    implementation ''


See Wiki on how to get started with Locus.

Pull Request

To generate a pull request, please consider following Pull Request Template.


To submit an issue, please check the Issue Template.

Code of Conduct

Code of Conduct


You are most welcome to contribute to this project!

Please have a look at Contributing Guidelines, before contributing and proposing a change.

   Copyright © 2019 BirjuVachhani

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   See the License for the specific language governing permissions and
   limitations under the License.

Source link