I am building an app specifically for watches, with it I'd like to have both a tile and a complication. In the tile I would like to show a simple chart of the users activity, or at the very least their progress for their daily goal. The problem is I can't find any sort of documentation on using a Room database inside the CoroutinesTileService() class. My app is written in Kotlin with Jetpack Compose. I'm sorry I don't have any code samples, as I can't even find a place to start. I have a simple TileService right now, but it's just a basic "Hello World" sample as a poc. I have been searching for hours and can't find anything with CoroutineTileService() and a Room database. Any help or links, or anything would be greatly appreciated.
Asked
Active
Viewed 32 times
0
-
First, it appears that `CoroutinesTileService` [no longer exists](https://github.com/google/horologist/issues/523). It has been `SuspendingTileService` for about 9 months. And, since `SuspendingTileService` is part of a library, expecting documentation regarding using `SuspendingTileService` with anything else is asking a bit much IMHO. I would look into using dependency inversion (e.g., Dagger/Hilt) to inject a repository into your `SuspendingTileService`, where the repository manages the Room access. – CommonsWare Jun 05 '23 at 23:37
-
weird, the Android codelab for tiles on their website uses CoroutinesTileService. I'll look into SuspendingTileService though and see if that helps. Thank you – Neglected Sanity Jun 07 '23 at 16:35