Skip to content

Commit

Permalink
Karoo SDK Release 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
brentnd committed Jan 6, 2021
1 parent 82a6741 commit 7468a97
Show file tree
Hide file tree
Showing 110 changed files with 2,217 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[Quick Start](https://hammerheadnav.github.io/karoo-sdk/index.html)

[API Documentation](https://hammerheadnav.github.io/karoo-sdk/0.0.2/karoo-sdk/index.html)
[API Documentation](https://hammerheadnav.github.io/karoo-sdk/0.0.3/karoo-sdk/index.html)

[Jitpack Build](https://jitpack.io/#io.hammerhead/karoo-sdk)

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
'compileSdk' : 28,

'kotlin' : '1.3.72',
'libraryVersion': "0.0.2"
'libraryVersion': "0.0.3"
]
repositories {
google()
Expand Down
25 changes: 25 additions & 0 deletions docs/0.0.3/karoo-sdk/alltypes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: alltypes - karoo-sdk
---

The top-level module that is provided as the Karoo SDK Android library

### All Types

| [io.hammerhead.sdk.v0.datatype.formatter.BuiltInFormatter](../io.hammerhead.sdk.v0.datatype.formatter/-built-in-formatter/index.html) | |
| [io.hammerhead.sdk.v0.datatype.transformer.BuiltInTransformer](../io.hammerhead.sdk.v0.datatype.transformer/-built-in-transformer/index.html) | |
| [io.hammerhead.sdk.v0.datatype.view.BuiltInView](../io.hammerhead.sdk.v0.datatype.view/-built-in-view/index.html) | |
| [io.hammerhead.sdk.v0.datatype.Dependency](../io.hammerhead.sdk.v0.datatype/-dependency/index.html) | Enumeration of possible dependencies for [SdkDataType](../io.hammerhead.sdk.v0.datatype/-sdk-data-type/index.html). |
| [io.hammerhead.sdk.v0.KeyValueStore](../io.hammerhead.sdk.v0/-key-value-store/index.html) | Simple storage of key/value pairs for use by Karoo SDK modules. This allows modules to store values that need to be persisted across rides and reboots. Additionally, allows access between full APK and Karoo SDK plugins and across plugin instances running within different Karoo apps. |
| [io.hammerhead.sdk.v0.Module](../io.hammerhead.sdk.v0/-module/index.html) | Karoo SDK Module |
| [io.hammerhead.sdk.v0.ModuleFactoryI](../io.hammerhead.sdk.v0/-module-factory-i/index.html) | Interface for factory to build a custom Karoo SDK module. |
| [io.hammerhead.sdk.v0.card.PostRideCard](../io.hammerhead.sdk.v0.card/-post-ride-card/index.html) | Definition of a post-ride card view. |
| [io.hammerhead.sdk.v0.card.RideDetails](../io.hammerhead.sdk.v0.card/-ride-details/index.html) | Details from a recorded ride. |
| [io.hammerhead.sdk.v0.RideLifecycleListener](../io.hammerhead.sdk.v0/-ride-lifecycle-listener/index.html) | Interface which is called for lifecycle events related to ride. |
| [io.hammerhead.sdk.v0.RideState](../io.hammerhead.sdk.v0/-ride-state/index.html) | Enumeration of ride state |
| [io.hammerhead.sdk.v0.SdkContext](../io.hammerhead.sdk.v0/-sdk-context/index.html) | Context wrapper specifically for use within external code (Karoo SDK Module) while running within the Karoo System. This allows use of the originating packages resources within the Karoo System app context. |
| [io.hammerhead.sdk.v0.datatype.SdkDataType](../io.hammerhead.sdk.v0.datatype/-sdk-data-type/index.html) | Definition of an extended data field to add to the Karoo System. |
| [io.hammerhead.sdk.v0.datatype.formatter.SdkFormatter](../io.hammerhead.sdk.v0.datatype.formatter/-sdk-formatter/index.html) | Abstract class to extend the way data field is formatted. |
| [io.hammerhead.sdk.v0.datatype.transformer.SdkTransformer](../io.hammerhead.sdk.v0.datatype.transformer/-sdk-transformer/index.html) | Abstract class to extend the way data field is formatted. |
| [io.hammerhead.sdk.v0.datatype.view.SdkView](../io.hammerhead.sdk.v0.datatype.view/-sdk-view/index.html) | Abstract class to extend the way data fields are displayed in ride. |

20 changes: 20 additions & 0 deletions docs/0.0.3/karoo-sdk/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: karoo-sdk
---

[karoo-sdk](./index.html)

The top-level module that is provided as the Karoo SDK Android library

### Packages

| [io.hammerhead.sdk.v0](io.hammerhead.sdk.v0/index.html) | Versioned namespace for first-release of Karoo SDK. |
| [io.hammerhead.sdk.v0.card](io.hammerhead.sdk.v0.card/index.html) | Package containing definitions showing card views |
| [io.hammerhead.sdk.v0.datatype](io.hammerhead.sdk.v0.datatype/index.html) | Package containing SDK extensions related to data type definitions |
| [io.hammerhead.sdk.v0.datatype.formatter](io.hammerhead.sdk.v0.datatype.formatter/index.html) | Package containing SDK extensions related to formatting data |
| [io.hammerhead.sdk.v0.datatype.transformer](io.hammerhead.sdk.v0.datatype.transformer/index.html) | Package containing SDK extensions related to transforming data streams |
| [io.hammerhead.sdk.v0.datatype.view](io.hammerhead.sdk.v0.datatype.view/index.html) | Package containing SDK extensions related to displaying data in custom views |

### Index

[All Types](alltypes/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: PostRideCard.<init> - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [PostRideCard](index.html) / [&lt;init&gt;](./-init-.html)

# &lt;init&gt;

`PostRideCard(context: `[`SdkContext`](../../io.hammerhead.sdk.v0/-sdk-context/index.html)`, rideDetails: `[`RideDetails`](../-ride-details/index.html)`)`

Definition of a post-ride card view.

``` kotlin
class RideCard(context: SdkContext, rideDetails: RideDetails) : PostRideCard(context, rideDetails) {
override fun createView(layoutInflater: LayoutInflater, parent: ViewGroup): View {
val view = layoutInflater.inflate(R.layout.ride_card_view, parent, false)
view.activityName.text = rideDetails.name
view.setOnClickListener {
val detail = Intent().setClassName("io.hammerhead.sample", "io.hammerhead.sample.DetailActivity")
context.startActivity(detail)
}
return view
}
}
```

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: PostRideCard.context - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [PostRideCard](index.html) / [context](./context.html)

# context

`protected val context: `[`SdkContext`](../../io.hammerhead.sdk.v0/-sdk-context/index.html)

SDK context

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: PostRideCard.createView - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [PostRideCard](index.html) / [createView](./create-view.html)

# createView

`protected abstract fun createView(layoutInflater: `[`LayoutInflater`](https://developer.android.com/reference/android/view/LayoutInflater.html)`, parent: `[`ViewGroup`](https://developer.android.com/reference/android/view/ViewGroup.html)`): `[`View`](https://developer.android.com/reference/android/view/View.html)

Called to inflate the layout or manually create the view
required for this card to show the [rideDetails](ride-details.html).

### Parameters

`layoutInflater` - to be used for calls to [LayoutInflater.inflate](https://developer.android.com/reference/android/view/LayoutInflater.html#inflate(int, android.view.ViewGroup)) to ensure
access to resources from module's containing APK

`parent` - the parent layout of the view being inflated
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: PostRideCard - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [PostRideCard](./index.html)

# PostRideCard

`abstract class PostRideCard`

Definition of a post-ride card view.

``` kotlin
class RideCard(context: SdkContext, rideDetails: RideDetails) : PostRideCard(context, rideDetails) {
override fun createView(layoutInflater: LayoutInflater, parent: ViewGroup): View {
val view = layoutInflater.inflate(R.layout.ride_card_view, parent, false)
view.activityName.text = rideDetails.name
view.setOnClickListener {
val detail = Intent().setClassName("io.hammerhead.sample", "io.hammerhead.sample.DetailActivity")
context.startActivity(detail)
}
return view
}
}
```

### Constructors

| [&lt;init&gt;](-init-.html) | `PostRideCard(context: `[`SdkContext`](../../io.hammerhead.sdk.v0/-sdk-context/index.html)`, rideDetails: `[`RideDetails`](../-ride-details/index.html)`)`<br>Definition of a post-ride card view. |

### Properties

| [context](context.html) | `val context: `[`SdkContext`](../../io.hammerhead.sdk.v0/-sdk-context/index.html)<br>SDK context |
| [rideDetails](ride-details.html) | `val rideDetails: `[`RideDetails`](../-ride-details/index.html)<br>Details for the ride card |

### Functions

| [createView](create-view.html) | `abstract fun createView(layoutInflater: `[`LayoutInflater`](https://developer.android.com/reference/android/view/LayoutInflater.html)`, parent: `[`ViewGroup`](https://developer.android.com/reference/android/view/ViewGroup.html)`): `[`View`](https://developer.android.com/reference/android/view/View.html)<br>Called to inflate the layout or manually create the view required for this card to show the [rideDetails](ride-details.html). |

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: PostRideCard.rideDetails - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [PostRideCard](index.html) / [rideDetails](./ride-details.html)

# rideDetails

`protected val rideDetails: `[`RideDetails`](../-ride-details/index.html)

Details for the ride card

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: RideDetails.<init> - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [&lt;init&gt;](./-init-.html)

# &lt;init&gt;

`RideDetails(id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, distance: `[`Double`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)`, stravaId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, trainingPeaksId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, komootId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, rideWithGpsId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?)`

Details from a recorded ride.

Can be used to show custom post-ride card with [PostRideCard](../-post-ride-card/index.html).

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.distance - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [distance](./distance.html)

# distance

`val distance: `[`Double`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)

Distance in meters

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.duration - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [duration](./duration.html)

# duration

`val duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)

Ride duration in ms.

12 changes: 12 additions & 0 deletions docs/0.0.3/karoo-sdk/io.hammerhead.sdk.v0.card/-ride-details/id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.id - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [id](./id.html)

# id

`val id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)

Hammerhead Ride ID

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: RideDetails - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](./index.html)

# RideDetails

`data class RideDetails`

Details from a recorded ride.

Can be used to show custom post-ride card with [PostRideCard](../-post-ride-card/index.html).

### Constructors

| [&lt;init&gt;](-init-.html) | `RideDetails(id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`, distance: `[`Double`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)`, stravaId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, trainingPeaksId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, komootId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, rideWithGpsId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?)`<br>Details from a recorded ride. |

### Properties

| [distance](distance.html) | `val distance: `[`Double`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html)<br>Distance in meters |
| [duration](duration.html) | `val duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)<br>Ride duration in ms. |
| [id](id.html) | `val id: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Hammerhead Ride ID |
| [komootId](komoot-id.html) | `val komootId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`<br>Komoot ID |
| [name](name.html) | `val name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)<br>Ride name |
| [rideWithGpsId](ride-with-gps-id.html) | `val rideWithGpsId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`<br>RideWithGPS ID |
| [stravaId](strava-id.html) | `val stravaId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`<br>Strava ID |
| [trainingPeaksId](training-peaks-id.html) | `val trainingPeaksId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`<br>Training Peaks ID |

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.komootId - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [komootId](./komoot-id.html)

# komootId

`val komootId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`

Komoot ID

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.name - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [name](./name.html)

# name

`val name: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)

Ride name

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.rideWithGpsId - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [rideWithGpsId](./ride-with-gps-id.html)

# rideWithGpsId

`val rideWithGpsId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`

RideWithGPS ID

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.stravaId - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [stravaId](./strava-id.html)

# stravaId

`val stravaId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`

Strava ID

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: RideDetails.trainingPeaksId - karoo-sdk
---

[karoo-sdk](../../index.html) / [io.hammerhead.sdk.v0.card](../index.html) / [RideDetails](index.html) / [trainingPeaksId](./training-peaks-id.html)

# trainingPeaksId

`val trainingPeaksId: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?`

Training Peaks ID

15 changes: 15 additions & 0 deletions docs/0.0.3/karoo-sdk/io.hammerhead.sdk.v0.card/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: io.hammerhead.sdk.v0.card - karoo-sdk
---

[karoo-sdk](../index.html) / [io.hammerhead.sdk.v0.card](./index.html)

## Package io.hammerhead.sdk.v0.card

Package containing definitions showing card views

### Types

| [PostRideCard](-post-ride-card/index.html) | `abstract class PostRideCard`<br>Definition of a post-ride card view. |
| [RideDetails](-ride-details/index.html) | `data class RideDetails`<br>Details from a recorded ride. |

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: BuiltInFormatter.None.<init> - karoo-sdk
---

[karoo-sdk](../../../index.html) / [io.hammerhead.sdk.v0.datatype.formatter](../../index.html) / [BuiltInFormatter](../index.html) / [None](index.html) / [&lt;init&gt;](./-init-.html)

# &lt;init&gt;

`None()`

Placeholder for use with [SdkView](../../../io.hammerhead.sdk.v0.datatype.view/-sdk-view/index.html)

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: BuiltInFormatter.None - karoo-sdk
---

[karoo-sdk](../../../index.html) / [io.hammerhead.sdk.v0.datatype.formatter](../../index.html) / [BuiltInFormatter](../index.html) / [None](./index.html)

# None

`class None : `[`BuiltInFormatter`](../index.html)

Placeholder for use with [SdkView](../../../io.hammerhead.sdk.v0.datatype.view/-sdk-view/index.html)

### Constructors

| [&lt;init&gt;](-init-.html) | `None()`<br>Placeholder for use with [SdkView](../../../io.hammerhead.sdk.v0.datatype.view/-sdk-view/index.html) |

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: BuiltInFormatter.Numeric.<init> - karoo-sdk
---

[karoo-sdk](../../../index.html) / [io.hammerhead.sdk.v0.datatype.formatter](../../index.html) / [BuiltInFormatter](../index.html) / [Numeric](index.html) / [&lt;init&gt;](./-init-.html)

# &lt;init&gt;

`Numeric(precision: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)`

Standard numeric formatting based on precision.

### Parameters

`precision` - number of digits to show after decimal point
Loading

0 comments on commit 7468a97

Please sign in to comment.