forked from Splitties/ComposeOClock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SampleWatchFaceService.kt
25 lines (21 loc) · 902 Bytes
/
SampleWatchFaceService.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.louiscad.composeoclockplayground
import androidx.compose.runtime.Composable
import androidx.wear.watchface.complications.data.ComplicationData
import androidx.wear.watchface.complications.data.ComplicationType
import kotlinx.coroutines.flow.*
import org.splitties.compose.oclock.ComposeWatchFaceService
import org.splitties.compose.oclock.sample.watchfaces.KotlinFanClock
import org.splitties.compose.oclock.sample.watchfaces.WatchFaceSwitcher
class SampleWatchFaceService : ComposeWatchFaceService(
complicationSlotIds = emptySet(),
invalidationMode = InvalidationMode.WaitForInvalidation
) {
@Composable
override fun Content(complicationData: Map<Int, StateFlow<ComplicationData>>) {
WatchFaceSwitcher()
}
override fun supportedComplicationTypes(slotId: Int) = listOf(
ComplicationType.RANGED_VALUE,
ComplicationType.SHORT_TEXT
)
}