Can I reuse compose-jb code for wearOS? I have som...
# compose-desktop
d
Can I reuse compose-jb code for wearOS? I have some composables written in multiplatform that I want to use on wearOS as well.
g
I didn’t try, but It should be possible, I don’t see any obvious blockers for this. WeorOS is still Android, especially if you already have MPP version of composable (so it doesn’t use platform-specific APIs
d
I saw that wearOS uses different packages for most of their components
Looks like I can use them, but it's not recommended
g
they use different composables comparing to compose material, sure, but isn’t you said that your composable is in MPP? Or you depend on something outside of foundation?
foundation composables should be supported on all platforms, if I’m not mistaken
d
I am using material3, so I need to implement the UI again for wearOS because it comes with its own definitions
I tried it now, it works on wearOS as well, but the theming is a little bit flawed
g
You can use different composables depending on the platform, if you want. Material3 should work directly, but it's not optimized for wearos
t
Obviously the Wear app should look different from the desktop app, but you can share composables. I am sharing some custom written compose views and they work great on both platforms. However, I do not share any material 3 code with Wear as that doesn’t look good on a watch. But you can share some compose logic of course.