About to release my first Jetpack Compose/ WearOS3...
# compose-wear
a
About to release my first Jetpack Compose/ WearOS3 app! This was my first introduction into Jetpack Compose and WearOS3 (there's a Tile that goes with the app). I've made apps and watch faces back when I still had the original moto 360, and it's awesome how far the wear ecosystem has come (still has a long way to go, but on the right track!) This is a complete standalone app for interacting with the Philips Hue ecosystem. Open to any thoughts on design, features, etc. Also if anyone has Philips Hue and is interested in beta testing, let me know!
💡 4
👌 2
🎉 9
j
Look great @Austin Nelson. Would love to hear any feedback on how you found Compose for Wear OS and what we could do to make it even better.
y
Looks amazing - few product thoughts. a) Togglechip could be useful on top level if it's more common to turn on/off than adjust hue / power. b) use Bezel / RSB to control power.
Is it going in the Play Store? Is it open source or private?
a
Thanks for the feedback! A togglechip would be a good idea. Can you elaborate more on the bezel / RSB (not sure what that is). @yschimke The project is currently private, as I am planning on selling it on the Play Store (soon!). I’m not familiar with licenses and such, but I would love to post the source code. The code is kind of a mess, but I do have a lot of questions on state management with Compose. I’m trying to use the MVVM model with Retrofit + Room and also trying to understand Flow. Also it seems my “DeviceDetail” screen is recomposing twice, which is not ideal 😅
@John Nichol This is my first Jetpack Compose project, but I think it makes a lot of sense in the Wear ecosystem! I really like it, but I still have a lot of learning to do. My initial questions would be 1. How do you interact with rotating bezels (my galaxy watch 4 has the ‘virtual’ outer bezel, but some watches have a physical one or even a knob on the side) 2. Why is “accompanist” a separate dependency and not part of the official Jetpack Compose library? It seems to have a lot of standard elements. I’m using the ViewPager and it seems really nice! 3. I know it says in the documentation to not mix the material dependencies, but I had to in order to use some elements. How bad is that? 😬
y
It's scrolling or changing values (say a slider) using the Watch Crown or the Bezel on Samsung watches. You can wait for official support or wire your own - https://github.com/joreilly/PeopleInSpace/blob/main/wearApp/src/main/java/com/surrus/peopleinspace/RotaryEventHandler.kt
👍 1
Which components from Compose Material have you needed? Things that are missing are probably candidates for them to add.
John or others working on it, can speak to incompatibility, but even things like Themes will be incompatible, so default fonts may differ in places and if you configure them you'll have to do it twice. Not sure about other issues.
I don't speak Accompanist, but it not being part of Jetpack means it can move faster without the same API guarantees long term. Also can add things that might be temporary, for instance there was a module for image loading, which was replaced by coil support.
👍 1
Accompanist is a group of libraries that aim to supplement Jetpack Compose with features that are commonly required by developers but not yet available.
a
Definitely going to add in Watch Crown/Bezel support! Thanks for the link!
Maybe there needs to be more specs on WearOS apps in general, but I personally found the ViewPager to be quite helpful, and could see that being an important widget in the platform. I think one of the biggest complaints I hear from the community is the lack of actual apps on Android Wear (compared to the Apple Watch). My goal is to start creating actual standalone (useful) apps on Android Wear. I hope this is a good start 🤞
❤️ 2
@yschimke Any thoughts on making the project open source (still want to be able to sell it on the Play Store). Most of my questions aren’t necessarily Wear specific, mainly just Jetpack Compose, so I didn’t know if I should post them here or in a different channel
y
It probably depends how valuable you think it is. I'm not a lawyer, but there have been cases of open source apps with a commercial version, and other people clone it and release it as cloned app.
j
@Austin Nelson coming back to @yschimke question which components from the Core Material Library did you find you needed? In terms of is it bad to mix the Material libraries there are two answers I guess, Yuri covered the fact that you will need to do extra work to keep things like fonts/colors/... aligned, but the more important thing for me is that there are components that we don't think make for good experiences on a Wearable and therefore don't include - like Surface or Linear Progress indicators. We haven't yet finished adding all of the components to Wear Material that we plan - but we are getting close, you will see ProgressIndicators and Pickers coming soon.
👍🏼 1
Regarding ViewPager we are expecting a ViewPager component similar to the one in Accompanist to get added to Core Compose at some point. We will then see if we need to do anything to specialize it for Wearables.
👍🏼 1
👍 1
👍🏽 1