Skip to content

Commit

Permalink
release 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bloody-Badboy committed Jul 13, 2021
1 parent c7caaf1 commit 6789956
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,29 @@ A library to request location update for both GMS and HMS with less boilerplate
---

# Usages

### Gradle
Add below codes to your **root** `build.gradle` file (not your module build.gradle file).
```gradle
allprojects {
repositories {
mavenCentral()
}
}
```
And add a dependency code to your **module**'s `build.gradle` file.
```gradle
dependencies {
implementation 'dev.arpan:location-engine:1.0.1'
}
```

Create `LocationRequest` object
```kotlin
private val locationRequest = LocationRequest().apply {
priority = LocationRequest.PRIORITY_HIGH_ACCURACY
interval = 20000L
fastestInterval = 10000L
interval = 20000L // default is 10000
fastestInterval = 10000L // default is (10000 / 6)
}
```

Expand Down Expand Up @@ -47,6 +64,7 @@ check the result in `onActivityResult` and start location update
if (requestCode == 100){
when (resultCode) {
RESULT_OK -> {
// start requesing locatoin updates
fetcher.startLocationUpdates()
}
LocationSettingsActivity.RESULT_PERMISSION_DENIED -> {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ systemProp.org.gradle.internal.http.socketTimeout=120000
GROUP=dev.arpan
POM_PACKAGING=aar

VERSION_NAME=1.0.1-SNAPSHOT
VERSION_NAME=1.0.1

POM_ARTIFACT_ID=location-engine
POM_NAME=location-engine
Expand Down

0 comments on commit 6789956

Please sign in to comment.