https://kotlinlang.org logo
#compose
Title
# compose
l

louiscad

02/07/2020, 10:55 AM
Is WearOS first-class support planned for Compose once the API stabilizes?
a

Adam Powell

02/07/2020, 2:48 PM
what kind of first-class are you thinking about? Compose should work anywhere Views do.
c

codeslubber

02/07/2020, 3:31 PM
SwiftUI started in the watch team at apple, and it is really impressive how completely it covers that bit of the waterfront. I am wondering if the team is using Compose with Wear. Would be a good idea.
a

Adam Powell

02/07/2020, 4:28 PM
The space overall has certainly been front of mind for me, same for TV as a form factor. Both leanback and wear had a lot of challenges that they hit in their respective API design and development, and imo a lot of difficulty arose from feature requests in common components being a part of the critical path for developing features for those form factors. (e.g. fragments, recyclerview)
"get out of the critical path of others developing features" is definitely a core principle of compose as a direct result. You can see it in the way we've been building in public API layers
👍🏻 1
l

louiscad

02/07/2020, 4:48 PM
@Adam Powell I'm asking for that: Have at least one person in charge of developing AND maintaining a sample for WearOS (that could be in an existing Compose sample project BTW), and have these WearOS Compose sample maintainers bring feedback to the Compose team, so if the API is not watch friendly, including Material Components, action is taken. That would help people getting started on WearOS + Compose. Good samples are very helpful. Same could be helpful for tablet & Chrome OS form factors, and for Android TV as well, even though I personally don't need that as much currently.
a

Adam Powell

02/07/2020, 4:50 PM
Can you go into a bit more detail about what you'd want out of material components in particular? I could see that going in a few different directions, specifically since I think many components would be form factor-specific.
l

louiscad

02/07/2020, 4:51 PM
WearOS, unlike other mentioned form factors, supports round screens BTW.
a

Adam Powell

02/07/2020, 4:51 PM
I'm quite aware; I was involved in all of the various API iterations of supporting that 🙂
l

louiscad

02/07/2020, 4:52 PM
Does Compose currently make it easy to work with round screens? If not, someone working on WearOS Compose samples can ensure this is not forgotten.
a

Adam Powell

02/07/2020, 4:54 PM
As easy as it is to work with portrait vs. landscape, yes.
Not everything has been migrated into
Configuration
-based ambients just yet, but the pattern is pretty straightforward.
and specific insets are always a barrel of fun; those general APIs are also WIP.
l

louiscad

02/07/2020, 4:57 PM
FYI, there's these things I know and questions I have: - Material Design Guidelines for wearables, where some components are watch form factor only. - Wear UI Library where some components are just for rounded screens handling, and some other are just following the Material Design Guidelines for wearables mentioned above. The documentation of this library is still in pre-AndroidX era BTW. - WearOS has something called "ambient mode", unfortunately tightly coupled to Wear Activities for now (forces inheritance over composition). There's some things to handle that, but how would that work in Jetpack Compose?
As you can see, if I were to start a WearOS app right now, trying Jetpack Compose for the UI, I have more questions than answers. A sample would be the answer to all of that, and might confirm the direction Compose is taking through internal feedback, or steer it in the right direction if needed. I'm not asking for it for today, but for before Compose API stabilizes. I'm believing in the potential of smartwatches and wearables (still wearing one, after 3+ years), but the resources available have a lot of dust, and making a good UI is always additional time, which Compose kinda promises to shorten, hence my request in that Compose channel.
☝🏻 2
a

Adam Powell

02/07/2020, 5:01 PM
yeah I'll mention it to some of our devrel folks that you're looking specifically for samples in this area 🙂
As for
WearableActivity
, I thought we had started moving away from that: https://developer.android.com/training/wearables/apps/always-on#ambient-mode-class
iirc all of this sits on public API or at least unbundled API that Compose can make use of and reformat where needed
l

louiscad

02/07/2020, 6:59 PM
As for
AmbientModeSupport.attach(this)
, I didn't recall about the API specifics. True that it helps for composition. I recall that I wanted to use WindowManager though (to enable overlay to see time all the time without having to exit the app), I had to reverse engineer that library, then I dropped off Wear dev, feeling like it was almost not maintained and asking for the feature would be a loss of my time. I'm getting interested again because my company still has use cases, and I found new abstraction tricks in Kotlin that make it easier for me to support multiple platforms, form factors or UIs, without having to hire extra people for an experiment, in a market that still waits to take off (yes, that's a chicken and egg problem, and me asking for WearOS Compose samples is an attempt to have an egg).
yeah I'll mention it to some of our devrel folks that you're looking specifically for samples in this area 🙂
Thanks for your consideration, looking forward what will follow 🙂
c

codeslubber

02/07/2020, 7:05 PM
@louiscad I would like to work on a sample if you decide to just make one yourself, what device are you using? I have had an Apple Watch since release 1 and do see it as a not going back thing, but also was hoping to see a pixel watch in the last cycle. I think I might buy an android watch to start using Wear in anticipation of it dropping in this cycle.
l

louiscad

02/07/2020, 7:06 PM
@codeslubber Your first sentence looks contradictory, could you rephrase it?
c

codeslubber

02/07/2020, 7:07 PM
contradictory? I am saying if you decide to work on a sample, of using Compose with WearOS, I would work on it or help out.
then I was asking what watch you are using to develop WearOS code
(unrelated I guess…)
l

louiscad

02/07/2020, 7:08 PM
This is in a thread, very related to WearOS dev, I think it's fine.
c

codeslubber

02/07/2020, 7:11 PM
wow depressing that the ticwatch pro has a 3.5 star rating on amazon..
l

louiscad

02/07/2020, 7:22 PM
I started with an LG G Watch when it was 50€. The update story was quite heartbreaking, with a one year beta that worked on only 2 watches, where they were completely breaking the paradigms. Then I got a Huawei Watch Active as a present, which had a the beta of Android Wear 2.0, then the update, but since then, it also dropped off updates, so it's running Android Wear 2.0 with half of the WearOS updates. I don't know how risky it is as a developer to wear a watch that has no security patches in the OS anymore, but I still use it, without that insanely slow Google Assistant (so only reading notifications, watching the time, setting a timer, and sometimes using some apps like Stockard, Speed wear, maps directions, pixtocam/Camera, and alarm for nap). I dropped off WearOS dev for many reasons, including the double updates heartbreak, and the doc and samples that now have years standing dust on them, despite Kotlin arrival. Anyway, I don't recommend the long abandoned Huawei Watch that I'd still use in my case as it's my only one (gave my LG G Watch to a friend). But 9to5google folks actually test the latest, so here you can find good options. There's still no cellular option, (though my company would love it, to have a full standalone app), unless you're privileged to live in the USA and opt to get a watch at Verizon. Note that their guide is updated almost monthly if there's new smartwatch releases (Moto 360 was the last one I believe though). https://9to5google.com/2020/01/14/best-android-smartwatches/
c

codeslubber

02/07/2020, 7:28 PM
What a mess: the best android smart watch according to amazon, is running Tizen.
☝️ 1
l

louiscad

02/08/2020, 9:37 AM
Just take the top WearOS one you prefer.
And yes, it's a mess 😔 I'm hopeful effort from Google towards devs brings more good devs onboard, to finally implement great use cases and allow the WearOS ecosystem to take off, making it more desirable than Tizen, and maybe more than Apple Watch too.
👍🏻 1
2 Views