What is the whole Remote Compose about? <https://g...
# compose
j
βž• 2
r
It's a Compose API that can be used to generate documents that can be played back in a remote viewer. Those documents have some amount of interactivity (animations, layouts, click callbacks)
πŸ‘€ 4
K 1
j
I know the words, but I don't understand πŸ˜„ What is a document in this context? What is a remote viewer? Is it connected to anything like RemoteViews? Or, what usecase do you envision for this? πŸ™‚ It wasn't announced, was it?
r
A document is just a binary blob, so something that can be sent over the network, or saved to disk, etc. A remote viewer is a viewer able to read and render those documents, which doesn't have to be in your app
πŸ‘ 1
πŸ‘πŸΎ 2
RemoteViews are different because they let you send instructions to views hosted in another process. This comes with limitations like not being able to do custom drawing. Remote Compose can send drawing instructions for instance
πŸ’‘ 2
s
so it's similar to server-side rendering?
r
Kind of but yeah
πŸ‘ 1
d
I feel like it's more client-side rendering and server-side composing... 😊
πŸ‘ 1
s
I see... Seems awesome.
r
@Didier Villevalois The name server-side rendering always felt silly to me. I guess it depends what you mean by rendering. Having worked on UI toolkit and graphics pipeline, it means putting pixels on screen. But to a lot of folks (mostly Web I guess), it's defining the UI from data. We need better vocabulary πŸ˜‚
K 9
☝️ 1
☝🏾 1
a
I see that remote-core is in java, any plans on making this multiplatform?
r
You'd have to ask Google folks, I don't work there anymore πŸ˜„
(but since it's "just" a document format, a viewer could be implemented in anything)
s
If I understand this correctly, then in a distant future, it could be possible for this to replace RemoteViews, then? App Widgets could, for example, essentially just be remote viewers, and we'd be able to send documents to them, instead of having Glance convert our Compose code to RemoteView stuff (with all of the limitations that brings)?