new banner
new banner


Locus is a tiny Kotlin library for Android that makes it very easy to get the location with just a few lines of code. Everything including the permissions model and location setting resolution is handled internally, which removes a lot of code that developers have to write each time.

Further information and configuration can be found in the wiki!

Read the blog here: The legendary task of getting location in just 3 lines of code.

properties

  • Android R support (please report if any problem is found)
  • Written entirely in Kotlin
  • Easy initialization
  • Handles the authorization model
  • No boiler plate
  • Built on Kotlin DSL
  • Manifest permission check
  • Lifecycle current location updates
  • Checking the location settings
  • Request for location settings
  • Configuration of the custom location options
  • Configuration of the custom relationship dialog
  • Configuring the Custom Permission Blocked Dialog Box

IMPORTANT: Obsolete from version 3.2.0

Text adjustments with Locus.configure{} Block is out of date v3.2.0. That means rationaleText, rationaleTitle, blockedTitle, blockedText, resolutionTitle, and resolutionText are out of date. The migration would consist of customizing / overwriting them strings.xml.

It is obsolete in version 3.2.0 and will be completely removed in the next version.

In front

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."
}

Now

string.xml

<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 'https://jitpack.io' } }
}
  • Paste the dependency into your app’s build.gradle file
dependencies { implementation 'com.github.BirjuVachhani:locus-android:latest-version' implementation 'com.google.android.gms:play-services-location:latest-version'
}

use

Further information can be found in the wiki place.

Pull request

To generate a pull request, please refer to the following pull request template.

Problems

To submit a problem, please review the problem template.

Code of Conduct

Code of Conduct

Contribution

You are cordially invited to contribute to this project!

Please read the Contribution Guidelines before you contribute and propose 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 http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

LEAVE A REPLY

Please enter your comment!
Please enter your name here