https://kotlinlang.org logo
Title
n

Nat Strangerweather

03/30/2023, 12:24 PM
Hi there, jus wanted to say I have finished my first wear OS app, which is an RSS reader. I wanted to thank you all very much for your generous help. The app is available for open testing and if you would like a promo code, please direct message me here on Slack. Pictures in thread. https://play.google.com/store/apps/details?id=com.strangerweather.news
PXL_20230323_161252303.jpg,PXL_20230323_161347387.jpg,PXL_20230323_161429260.jpg
j

John Nichol

03/30/2023, 3:52 PM
Congrats on getting to the end of your first App - Obviously we would be interested in any feedback on your experience. I hope your app is successful 🙂
n

Nat Strangerweather

03/30/2023, 4:07 PM
Thank you very much for your good wishes! Is there any specific feedback that you are looking for or just more generally? I'll start thinking. 😉
a

Ataul Munim

03/30/2023, 4:14 PM
Congrats Nat!
n

Nat Strangerweather

03/31/2023, 6:49 PM
@John Nichol In terms of feedback, what I found the hardest was the fact that much of the documentation is not made for Jetpack Compose. For instance, I struggled quite a bit with the tile. I spent ages trying to make this work: https://developer.android.com/training/wearables/tiles/get_started#create_a_tile only to find out that it's actually really easy with Compose... In the same way, while the samples are really very helpful, when it came to the DataLayer one, I was not sure how to implement it with Compose. Because I am used to only having one activity, I wasn't sure whether I was meant to create another activity or to use the code in my MainActivity. One disclaimer is that I am not a professional; this is a hobby for me and I don't excel at it! 😉
a

Ataul Munim

03/31/2023, 6:51 PM
Out of interest, what did you end up with for your Compose tile? 👀
n

Nat Strangerweather

03/31/2023, 6:52 PM
Do you mean what the code looks like?
a

Ataul Munim

03/31/2023, 6:52 PM
Yes/how far you got with it.
Happy to DM on this particular topic too; I can share feedback with the tiles team.
n

Nat Strangerweather

03/31/2023, 6:54 PM
In the end it was as simple as this:
class MainTileService : GlanceTileService() {

    @Composable
    override fun Content() {
        val imageSize = LocalSize.current.times(1f)
        Column(
            modifier = GlanceModifier.fillMaxSize().background(Color(0xff17244E)).clickable(
                    actionStartActivity<MainActivity>()
                ),
            horizontalAlignment = Alignment.CenterHorizontally,
            verticalAlignment = Alignment.CenterVertically
        ) {
            Image(
                provider = ImageProvider(R.drawable.logo),
                modifier = GlanceModifier.size(imageSize.width, imageSize.height),
                contentScale = ContentScale.FillBounds,
                contentDescription = "Logo"
            )
        }
    }
}
a

Ataul Munim

03/31/2023, 6:54 PM
ahh fair enough 😅
n

Nat Strangerweather

03/31/2023, 6:54 PM
I love Compose lol
a

Ataul Munim

03/31/2023, 6:55 PM
Glance is currently in alpha, and we recommend Tiles Material for building tiles at this time. Fair enough though, the API isn't as friendly as Compose
n

Nat Strangerweather

03/31/2023, 6:55 PM
Yeah, this was a bit daunting lol:
).build()
                    ).build()
                ).build()
            ).build()
        ).build())