Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharkaboi committed Mar 24, 2024
1 parent ef565c5 commit 3956b5c
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,25 @@ XML structure supported by default :

#### Custom source

```kotlin
class CustomVersionSource(
override val currentVersion: String,
override var versionComparator: VersionComparator<String> = DefaultStringVersionComparator
) : AppUpdateCheckerSource<String>() {
private val customSource = "https://mywebsite.com/latestVersion"

override suspend fun queryVersionDetails(): VersionDetails<String> {
// Do your processing to fetch from source here
...
// Handle exceptions if needed here, wrap with AppUpdateCheckerException if needed
return VersionDetails(
latestVersion = version,
latestVersionUrl = "https://mywebsite.com/download.apk",
releaseNotes = null
)
}
```kotlin
class CustomVersionSource(
override val currentVersion: String,
override var versionComparator: VersionComparator<String> = DefaultStringVersionComparator
) : AppUpdateCheckerSource<String>() {
private val customSource = "https://mywebsite.com/latestVersion"

override suspend fun queryVersionDetails(): VersionDetails<String> {
// Do your processing to fetch from source here
...
// Handle exceptions if needed here, wrap with AppUpdateCheckerException if needed
return VersionDetails(
latestVersion = version,
latestVersionUrl = "https://mywebsite.com/download.apk",
releaseNotes = null
)
}
```
}
```

### Check for update

Expand Down

0 comments on commit 3956b5c

Please sign in to comment.