Project setup
To use the Fused Location SDK, you need to configure the SDK dependencies and permissions.
Add the SDK dependency
Add the dependency as shown in the example below.
settings.gradle
file
- Kotlin
- Groovy
dependencyResolutionManagement {
...
repositories {
...
maven("https://nexus-playground.pleos.ai/repository/maven-releases/")
}
}
dependencyResolutionManagement {
...
repositories {
...
maven {
url "https://nexus-playground.pleos.ai/repository/maven-releases/"
}
}
}
App module's build.gradle
file
- Kotlin
- Groovy
dependencies {
implementation("ai.pleos.playground:FusedLocation:1.0.4")
}
dependencies {
implementation "ai.pleos.playground:FusedLocation:1.0.4"
}
Permission configuration
You must register the appropriate permissions for each API to use the Fused Location SDK's APIs
The @RequiresPermission
annotation allows you to easily check and register the necessary permissions.
Below is an example of AndroidManifest.xml
.
AndroidManifest.xml
// For example:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="pleos.car.permission.FUSED_LOCATION" />
// .. omitted
</manifest>