Hey everyone! I have an Android app written with C...
# compose-desktop
a
Hey everyone! I have an Android app written with Compose and I want to use the UI and other code as much as possible to build desktop app with Compose. Did someone already did something similar? What was the experience? And I have also few specific questions in mind and I would appreciate some feedback from the experienced devs. 1) Can you auto-update app over the air? 2) What is the best way to build and distribute apps across Mac, Windows and Linux platforms? 3) Can you have auto-start feature (start on system boot) within the app? 4) Can we have a background processes running in the background? E.g. a socket connection doing ping-pong and responding whenever requests comes in. And finally, any good links on how to setup app architecture? Thanks!
s
@Aleksandar Ilic Compose works on declarative pattern to build UI. According to you question we can use Compose to share your UI with multiple platform (Android, iOS, Desktop, Web). Here's my thought on your questions : 1. Compose doesn't support Over-the-air (OTA) update like flutter through ShoreBird. 2. Currently there are two option's to create and distribute Desktop App using Gradle System & Conveyor 3. Auto-start is system specific component - Nothing to do with Compose API. 4. Again Background processing or communication is system specific component - Nothing to do with Compose API. 5. You can refer this template to get started with Desktop App and evolve and improve app architecture further more according to project use cases and requirements. (This template was not maintained actively so consider some changes here and there).
a
Thanks @Swapnil Musale. It's very useful. Regarding system specific components, can you point me into direction where to learn how to do both points? Does this mean we have to write a solution for every platform?
1
s
@Aleksandar Ilic I'm not possessing enough knowledge on the above points concerning Desktop App Development. Better to take help from someone who's good at it Happy Coding 👨‍💻😀
☀️ 1
m
@Aleksandar Ilic The above answers aren't quite correct. Disclosure: my company makes Conveyor. It solves all your requests. 1. It integrates online update with your app. 2. It is probably the "best" way in terms of features. For commercial apps it costs money, for open source apps it doesn't. If price is your only concern then you'd need to stick with the built-in CfD packaging tasks but they don't handle updates. 3. There is a Conveyor config key for start-at-login, for Windows only. We don't have it implemented for macOS or Linux. You could implement that yourself or we could do it for you, if you want to take out a dev contract. 4. Yes there's nothing special required for this on desktop. You just start the program but don't open a window. Normally you'd need some small bit of UI to let the user quit the program, of course
And in terms of app architecture, that really depends on what you mean by the term. Desktop apps are less architecture-heavy than mobile apps for various reasons. For example you aren't expected to rebuild state on demand or handle navigation stacks as an OS requirement so your app may simply not require those things.
a
Thanks @mikehearn, it seems that Conveyor is the perfect solution. And I got your points for No4 and the architecture. I’ll have to get my hands on the code now.