Skip to content

Commit

Permalink
Update usage doc fixing minor typos
Browse files Browse the repository at this point in the history
  • Loading branch information
eyedol committed Aug 16, 2024
1 parent a4b5a3f commit 9c4ec46
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ jobs:
- uses: gradle/gradle-build-action@v3

- run: |
./gradlew --no-configuration-cache \
:dokkaHtmlMultiModule \
./gradlew --no-configuration-cache :dokkaHtmlMultiModule
- name: Copy Dokka output to site
run: cp -r build/dokka/htmlMultiModule/ site/api/
Expand Down
4 changes: 2 additions & 2 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ consuming the location services as a Compose [State](https://developer.android.c

## Installation

To use `klocation` in your project, add the following dependencies to your build.gradle file:
To use `klocation` artifact in your project, add the following dependencies to your gradle build file:

```kotlin
dependencies {
implementation("com.addhen:klocation:<version>")
}
```

For `klocation-compose`, add the following dependencies to your build.gradle file:
For `klocation-compose` artifact, add the following dependencies to your build.gradle file:

```kotlin
dependencies {
Expand Down
13 changes: 8 additions & 5 deletions docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Usage
=====

There two main ways to use KLocation. Either by using the `klocation` artifact or the `klocation-compose` artifact.
There two main ways to use KLocation library. Either by using the `klocation` artifact or the `klocation-compose` artifact.

## klcoation artifact
## For klcoation artifact

## klocation-compose artifact
## For klocation-compose artifact

This guide will walk you through using the APIs provided for consuming location in your
Compose-based application.
Expand All @@ -17,7 +17,7 @@ To receive continuous location updates, use the `locationUpdatesState()` functio

import com.addhen.klocation.compose.locationUpdatesState

Composable
@Composable
fun LocationTracking(locationService: LocationService) {
val locationState by locationUpdatesState(locationService)

Expand Down Expand Up @@ -75,7 +75,10 @@ useful when you want to force a refresh of the last known location based on cert
import com.addhen.klocation.compose.lastKnownLocationState

@Composable
fun RefreshableLastLocation(locationService: LocationService, refreshTrigger: Boolean) {
fun RefreshableLastLocation(
locationService: LocationService,
refreshTrigger: Boolean
) {
val lastLocationState by lastKnowLocationState(locationService, refreshTrigger)
// Use lastLocationState as before...
}
Expand Down

0 comments on commit 9c4ec46

Please sign in to comment.