All Projects β†’ BirjuVachhani β†’ locus-android

BirjuVachhani / locus-android

Licence: Apache-2.0 license
An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to locus-android

FusedBulb
Location fetch library.
Stars: ✭ 22 (-92.14%)
Mutual labels:  location, android-development, android-studio
MyNotes
πŸ“’Note taking app, MVVM with Google Architectural components Room, LiveData and ViewModel written in Kotlin, androidx libraries
Stars: ✭ 60 (-78.57%)
Mutual labels:  android-development, android-studio, hacktoberfest-accepted
media-picker
Easy customizable picker for all your needs in Android application
Stars: ✭ 167 (-40.36%)
Mutual labels:  android-development, android-studio, kotlin-android-extensions
Placepicker
Free Android Map Place Picker alternative using Geocoder instead of Google APIs
Stars: ✭ 126 (-55%)
Mutual labels:  location, android-development
Androidstandarddevelop
🌟 Best practices in Android develop(final).
Stars: ✭ 2,798 (+899.29%)
Mutual labels:  android-development, android-studio
Lost
A drop-in replacement for Google Play services location APIs for Android
Stars: ✭ 327 (+16.79%)
Mutual labels:  location, android-development
Hacktoberfest-Algorithms
This repository is mainly open to those who are looking to make some PRs for the Hacktoberfest 2020 event. In this repository, you can add programs on some useful algorithms for Competitive Programming in any languages.
Stars: ✭ 47 (-83.21%)
Mutual labels:  hacktoberfest2020, hacktoberfest-accepted
awesome-ufma
Uma lista de provas das disciplinas ministradas na Universidade Federal do MaranhΓ£o.
Stars: ✭ 63 (-77.5%)
Mutual labels:  hacktoberfest2020, hacktoberfest-accepted
HacktoberFest2021
hacktoberfest-accepted repository
Stars: ✭ 25 (-91.07%)
Mutual labels:  hacktoberfest2020, hacktoberfest-accepted
ValidUtil
No description or website provided.
Stars: ✭ 23 (-91.79%)
Mutual labels:  android-development, android-studio
Hactoberfest-2021
Make your first PR! ~ A beginner friendly repository made specifically for open source beginners. Add your profile, a blog or any program under any language (it can be anything from a hello-world program to a complex data structure algorithm) or update the existing one. Just make sure to add the file under the correct directory. Happy hacking!
Stars: ✭ 134 (-52.14%)
Mutual labels:  hacktoberfest2020, hacktoberfest-accepted
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (-21.79%)
Mutual labels:  android-development, android-studio
K4kotlin
A sweet, small set of Kotlin functions to reduce your android boilerplate code
Stars: ✭ 210 (-25%)
Mutual labels:  android-development, android-studio
Pelias Android Sdk
Android sdk for pelias
Stars: ✭ 20 (-92.86%)
Mutual labels:  location, android-development
Perfectshow
Android virtual makeup app, apply cosmetics on human face.
Stars: ✭ 194 (-30.71%)
Mutual labels:  android-development, android-studio
Advancedrecycleview
β™» RecycleView with multiple view types, inner horizontal RecycleView and layout animation
Stars: ✭ 172 (-38.57%)
Mutual labels:  android-development, android-studio
camunda-external-task-client-python3
Camunda External Task Client in Python
Stars: ✭ 43 (-84.64%)
Mutual labels:  hacktoberfest2020, hacktoberfest-accepted
Lookatme
VideoView that plays video only when πŸ‘€ are open and πŸ‘¦ is detected with various other features
Stars: ✭ 161 (-42.5%)
Mutual labels:  android-development, android-studio
Dinocompose
Chrome's Dino T-Rex game developed in Jetpack Compose
Stars: ✭ 170 (-39.29%)
Mutual labels:  android-development, android-studio
VideoPreLoading
Demo for video PreLoading/ PreCaching using ExoPlayer 2.13.3 in Android.
Stars: ✭ 61 (-78.21%)
Mutual labels:  android-development, android-studio

banner

Locus-Android

License language Platform API Release

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.

Documentation:

See Wiki for more information and configuration!

Read blog here:

The Legendary Task of Retrieving Location in Just 3 lines of code.

Features

  • 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 Rationale Dialog configuration
  • Custom Permission Blocked Dialog configuration

IMPORTANT:

Breaking Changes from v4.0.0

Text Customizations using Locus.configure{} block which were deprecated in v3.2.0 have been now removed completely. This means rationaleText, rationaleTitle, blockedTitle, blockedText, resolutionTitle, and resolutionText no longer exist on Locus.configure{}. Migration would be to customize/override them from strings.xml.

Before

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

strings.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>
<string name="grant">Grant</string>
<string name="deny">Deny</string>

checkout strings.xml.

How to disable background location permission if you don't use it.

It has been brought to my attention recently that this library includes background location permission in its AndroidManifest.xml file. This could cause a problem when publishing app on Google Play Store in a case where your does not actually request or use background location. If that happens then this is what you need to do.

Just add this line in your app's AndroidManifest.xml file and you should be good to go.

<uses-permission tools:node="remove" android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

Feel free to re-open #53 issue or file a new one if this does not work for you.

Gradle Dependency

  1. Add the JitPack repository.

For Classic Android Project:

Add this in your project's build.gradle file.

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

For Compose Android Project:

Add this in your project's settings.gradle file.

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        ...
        maven { url 'https://jitpack.io' } // add this line only
    }
}
  1. Add the dependency in 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'
}

Usage

See Wiki on how to get started with Locus.

Pull Request

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

Issues

To submit an issue, please check the Issue Template.

Code of Conduct

Code of Conduct

Contribution

You are most welcome to contribute to this project!

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

Buy Me A Coffee

License

   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.
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].