Within sample/, a sample application with Karoo SDK integration is provided with examples for various extensions that can be added to Karoo.
The sample module is provided as Java and Kotlin code, both implementing the same 3 data types:
AppVal
- Shows value from Key/Value store set in MainActivity.Custom Speed
- Uses speed dependency with a custom view to display it.Power/HR
- Uses a transformer to display ratio of Power/HR with built-in numeric view and formatting.
Additionally, the sample modules (Java and Kotlin) create a simple post-ride card that show the activity name in a purple box.
To install the basic sample app:
./gradlew sample:installDebug
The Kotlin sample module is available in sample/src/main/java/io/hammerhead/samplemodule/kotlin This is a good starting point or reference if you have an existing Android app written in Kotlin.
The Java sample module is available in sample/src/main/java/io/hammerhead/samplemodule/java. This is a good starting point or reference if you have an existing Android app written in Java.