8
12
u/Nilzor Feb 12 '21
Wait... On desktop? What's going on here?
19
u/fmaldonado6 Feb 12 '21
Apparently Jetpack Conpose is being developed by Jetbrains and Google so it's compatible outside of Android aswell
5
Feb 12 '21
I'm confused now - is this project being developed in Android Studio or IntelliJ? I see the code uses androidx imports, I would have expected non-platform-specific imports if it runs on desktop. Also I don't see any AndroidManifest.xml so it seems besides the import it has nothing to do with Android?
2
u/fmaldonado6 Feb 12 '21
It was developed using just Intellij, jetpack compose (or jetbrains compose as it is called on desktop) works perfectly fine outside of the android environment, but of course without the android specific things, such as activities, fragments, live data and all that stuff
3
u/adxgrave Feb 12 '21 edited Feb 12 '21
Btw, why nvidia in-game overlay suddenly activate?
9
u/fmaldonado6 Feb 12 '21
I think that I configured that any Java application should use my gpu to run in the Nvidia control panel, so it probably detected it as a game haha
3
1
u/Rhed0x Hobby dev Feb 16 '21
Most likely rendered using OpenGL => Nvidia driver thinks it's a game.
2
u/zelereth Feb 12 '21
I'm not getting into compose yet as it is in (pre)alpha? But gonna save this for sure, thanks!
OP, do you think we should start getting into it?
1
u/fmaldonado6 Feb 12 '21
I would recommend to wait until beta is released, as some things are bound to change
14
u/Jazzinarium Feb 12 '21
That Nvidia notification felt like you unlocked an achievement for running the app haha
1
u/lamagy Feb 12 '21
Very nice so spinners ect are not default?
3
u/fmaldonado6 Feb 12 '21
The components are there, but I couldn´t find any demo that actually used them, as all of them used fake data so there was no need to show any kind of loading indicator
2
u/Dreadino Feb 12 '21
What is required to do to port an Android Compose app to desktop? I can imagine that all the Android stuff is out (Activity, Fragment, ViewModel, Navigation), but I’d then need to check specific libraries for compatibility (Retrofit, Room, RxJava, ecc).
After that? How does the paradigm change?
3
u/AntonyGolovin Feb 12 '21
RxJava will work for sure because it's not bound to Android. Same for Coroutines and Retrofit.
2
1
1
u/anpvt Feb 16 '21
what's about jetpack compose performance on android devices and desktop? I've just tested some demo on real android device, but the performance too slow for me.
1
1
u/bumhugger Nov 07 '21
How did you setup this? Your app starts pretty much instantly after clicking the run button, but for me it's at least 30-40 seconds every time and the initial build is usually almost 2 minutes. On i9, 32GB ram.
On closer look, you don't seem to use gradle for running the app - how to achieve that? If I change Gradle to use IntelliJ for building and running, in the settings, I get exceptions about missing classes and the app doesn't start.
0
Feb 12 '21
[deleted]
1
u/fmaldonado6 Feb 12 '21
Sure go ahead!, And yeah it's a really fun API, specially if you like anime hahaha
34
u/fmaldonado6 Feb 11 '21
I was looking for example apps but couldn´t find any that had real data and needed to show spinners and error messages, so decided to create one using the Jikan Api to get data from My Anime List, here is the source code if anyone is interested! https://github.com/Fmaldonado6/jetpack-anime-demo