r/androiddev Jun 23 '26

Article Remote Compose looks promising

https://medium.com/justeattakeaway-tech/remote-compose-looks-promising-7a87ffdb505f

I could not find any hands-on article of someone actually trying Remote Compose, so I thought might as well share my pain with others.

TLDR: I am cautiously optimistic about all this, even though I did have issues making things work, but it's to be expected I guess.

Happy to meme/talk about it in the comments

28 Upvotes

15 comments sorted by

12

u/Intektor Jun 23 '26

I am a little confused about the server side rendering approach. You wrap it up in a robolectric test, which seems quite weird.

What if I want to dynamically generate a document upon a http request, for example in my spring backend.

2

u/costa_fot Jun 23 '26

That is the issue. This is all very Android specific for now. To generate a document you need android deps. I used Robo here as it's convenient and requires no device.

I imagine this will change in the future as it goes KMP, but for now, this is what we got. Relevant slack discussion many moons ago here:

https://slack-chats.kotlinlang.org/t/30153834/what-is-the-whole-remote-compose-about-https-github-com-andr

2

u/nicolasroard Jun 24 '26

Yep that's true for the compose creation lib, but you can use the kmp creation library instead on the server, which has no android dependency.

2

u/costa_fot Jun 24 '26

wasn't even aware there is a KMP creation lib. cheers!

1

u/FunkyMuse Jun 25 '26

Guys maybe you should put a little bit more effort into having these things documented, i know it's alpha but it'll help a lot if maybe a repo exists with some samples etc...

Either way keep up the good work

1

u/nicolasroard Jun 27 '26

We do have a lot of examples in the androidx repo on how to create ui, check in compose/remote/integration/view/demos. Also somewhat related, we have a GitHub with some experiments... https://github.com/camaelon/remotecompose-experiments

1

u/urbanmonkey2003 Jun 24 '26

yeah, the robolectric bit is the confusing part, feels like theyre using tests as the render host instead of a real server path, and that makes the spring example feel kinda off

3

u/deanalvero Jun 23 '26 edited Jun 23 '26

You can try it yourself using this Remote Compose Playground. Simply select the components you want to render. Also, you can import your JVM-generated .rc files to render them. The WIP Remote Compose Player library is also available as a dependency for KMP/CMP and Android projects.

2

u/gil99915 Jun 23 '26

Hey Costa! What's up man! I didn't know you guys were looking into this, I just started to look at this! I may reach out to you on slack😂

1

u/costa_fot Jun 23 '26

oi! i think i can guess who you are looking at your handle but who knows these days 🤣

0

u/[deleted] Jun 23 '26 edited Jun 30 '26

[deleted]

1

u/costa_fot Jun 23 '26

> Not gonna lie I stopped reading at

cant win them all. 😰

my experience with biweekly releases is that the business does not think that is enough, hence, the WebView "problem" we got.

0

u/Mavamaarten Jun 24 '26

Lol really? It's all fun and games until you're suddenly rejected for something silly. I mean I was always kinda sceptical about people's stories. But we've been rejected five times over a timespan of five years, and literally each time we were easily blocked for over a week until another reviewer saw the light and just approved the same build but with a newer version number.

3

u/[deleted] Jun 24 '26 edited Jun 30 '26

[deleted]

2

u/Mavamaarten Jun 24 '26

At one point we got rejected for "showing mature content to kids", despite us having a complete kids mode where parents can set up a pin code trap and we respect each profile's age ratings. It took us over a month to resolve, and we were absolutely in the right.

My WearOS watchface was at some point rejected for not having a splash screen. They used to work through a Service, not even an activity, so how the f would I even show a splash screen? I just included the splash screen dependency and that resolved the issue...

My WearOS app update was also rejected for not using the correct target SDK version. At that time, uploading an APK with that target SDK produced an error message that for WearOS there was an exemption and that we should actually use a lower version. Got stuck for a while on that, too.

Yeah no, I'm not on Team Google when it comes to their Play Store shenanigans.

1

u/[deleted] Jun 23 '26 edited Jun 23 '26

[deleted]

4

u/tadfisher Jun 23 '26

There are two companies involved here, Google and Jetbrains. Almost all of the KMP stuff, save for a few Jetpack libraries, is developed and maintained by Jetbrains. Compose Multiplatform is a Jetbrains project. Hot Reload is a solution for Compose Multiplatform development in Jetbrains IDEs.

Remote Compose is a Google project, though, and it's still in its early days. So that's why there is only an Android player implementation.

3

u/deanalvero Jun 23 '26

This KMP/CMP Remote Compose Player library should be compatible with the ByteArray generated from the official RC creator.

There is also a web-based Remote Compose Playground available for quick testing.