Interesting, I'm learning Compose with a demo app that contains a Bottom bar and with a Google Map in one tab and I'm having similar problems. I'll try your approach. Thank you.
Great vlog and great trick with google map. I was wondering, did you try using snapshot in Compose? I tried with no luck. The liteMode is not working and the only workaround I found is to make AndroidView, add markers, etc, call onSnapshotReady, and add the bitmap to the Image component. The problem is, we still have the AndroidView with GoogleMaps, so we need to hide it. It is very hacky. Maybe you have some experience with that matter?
Can you store the objects by remember to avoid re composition from resetting everything, and maybe the map can be reinitialized with a launched effect with the map hashcode as the key?
Really interesting Mitch! I am still a noob app developer but have a few simple projects on the go at the moment, one using Compose and an older one I've been working on for a while doing it the older xml way. You got me hyped up and now gonna get stuck into finishing them up! Loving compose at the moment! I have a 2 week holiday off work in May, really thinking about buying your clean architecture course and completing it all while i'm free from my job for a while! Keep it up, ❤ from UK 😁
Faced the same issue and yep, i had to move the map and clusterManager to the viewmodel. This is really shitty. I hope a compose version of google map comes out soon
Hey, very good example because Jetpack Compose and google maps is not documented for some reason. Do you have the source code avaiable for this? It would really help me alot! Thanks and great video!
If user navigates from a map in a specific position/pin to another composable and then navigates back to the compose containing the map. The map will have to be completely recomposed using state and then pin position reloaded ? Not a great user experience. With fragments we could just resume fragment where we left off if data has not changed
Yo! Mitch that’s interesting to see how this pans out.
2 роки тому
Thank you so much! The map in viewmodel thing should become a blogpost. I spent whole day, trying to solve an issue with ghost clusters and this finally worked! Would have never thought of this solution myself.
Hey Mitch, I just want to ask you if you can show us the way you prefer learning a new platform, just like compose and now the ios app development. Is it by trying out different features in the docs? Or by building some practice app? Maybe you can make a vlog about that? Cause I'm kind of in the middle of learning compose rn, and I'd love to know what's your way of learning new programming stuff. Please and thank you.
Hey, great vlog! I think that since the GoogleMap object is more of a part of the ViewModel than the view itself since it contains "state" and view. I have two questions: 1. Since you initially wanted to keep the GoogleMap object in the composable itself, did you consider using remember/rememberSaveable functions? 2. What do you think about Google Maps android library not receiving any updates in such a long time? It seems like it's an abandoned project. Very strange to me.
Actually it's being worked on a lot it seems developers.google.com/maps/documentation/android-sdk/v310-beta developers.google.com/maps/documentation/android-sdk/ktx developers.google.com/maps/documentation/android-sdk/utility Did not use remember because rotation would cause issues.
Recently i was watching the video about checking internet connection pinging google, so i thought is it gonna work in China? as i know google is banned there.
If you don't need different layouts for landscape/portrait, setting activity manifest tag attribute android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" will save you a lot of pain. And if you do need custom layouts, you can use ConstraintLayout or MotionLayout to rearrange your views easily.
Hey Mitch, I would love to see how to download a file or an image over network in your upcoming KMM videos, and especially how to represent it as a common model/data type in the common module.
I don't have downloading but I have videos about uploading images to a server in a previous course. codingwithmitch.com/courses/powerful-android-apps-with-jetpack-architecture/
@@zohaib9381 ya because it was painful. The BottomSheetScaffold doesn't work properly when a google map is in the background so I had to build one from scratch with my own animations and everything
Make the kmm course after this project man. can't wait
can you share the code on how to do clustering in jetapack compose interop
Interesting, I'm learning Compose with a demo app that contains a Bottom bar and with a Google Map in one tab and I'm having similar problems. I'll try your approach. Thank you.
Wish I could share the code but it's a production project
it seems john o is coming to your vlog very soon.
Great vlog and great trick with google map. I was wondering, did you try using snapshot in Compose? I tried with no luck. The liteMode is not working and the only workaround I found is to make AndroidView, add markers, etc, call onSnapshotReady, and add the bitmap to the Image component. The problem is, we still have the AndroidView with GoogleMaps, so we need to hide it. It is very hacky. Maybe you have some experience with that matter?
Does the sample have the same life cycle issue?
No because it just has simple marker
Great Job about the KMM project!!!
So do you think Jetpack Compose has value ? You'll be using compose from now on ?
Yep compose is the way
@@codingwithmitch even though it pains me, I have to say bb to xml and dive in compose I guess.
Thanks for your shitty vlogs Lol
Dude kmm need to learn this ! I both the founding member membership do not regret it greetings from bogota colombia
Flutter is for Babies, is KMM for oldies?
Exactly
This time you didn't censor the word "shitty"
Ya fuck it
Can you store the objects by remember to avoid re composition from resetting everything, and maybe the map can be reinitialized with a launched effect with the map hashcode as the key?
I'm really excited about the KMM stuff...
Mitch is xml easy Or compose
Compose >>>> xml
Hey mitch, could you please make a video on how to use google maps in compose?
Started playing with compose for 3 days.Will post on linkedin about my experience once I am done
I got one question for you : Whaat are thooosssseeee?
No censor this time! What will happen to family audience?? ;)
Yolo
Hey Mitch, it's tricky but you are almost overcoming the challenge..
Really interesting Mitch! I am still a noob app developer but have a few simple projects on the go at the moment, one using Compose and an older one I've been working on for a while doing it the older xml way. You got me hyped up and now gonna get stuck into finishing them up! Loving compose at the moment! I have a 2 week holiday off work in May, really thinking about buying your clean architecture course and completing it all while i'm free from my job for a while! Keep it up, ❤ from UK 😁
Nice. Ya compose is awesome. I'm glad I hyped you because it is hype
A cluster with markers that have same coordinates doesn't expand. How to avoid this?
ENGAGEMENT!
Hello Mitch, can you tell me how to show that Problems tab in Android Studio? It only showing on IntelliJ in my computer
Faced the same issue and yep, i had to move the map and clusterManager to the viewmodel. This is really shitty. I hope a compose version of google map comes out soon
Hey, very good example because Jetpack Compose and google maps is not documented for some reason. Do you have the source code avaiable for this? It would really help me alot! Thanks and great video!
Do you have any sample code to render this cluster on map with compose?
can't wait for the kmm series :)
If user navigates from a map in a specific position/pin to another composable and then navigates back to the compose containing the map. The map will have to be completely recomposed using state and then pin position reloaded ? Not a great user experience. With fragments we could just resume fragment where we left off if data has not changed
Yo! Mitch that’s interesting to see how this pans out.
Thank you so much! The map in viewmodel thing should become a blogpost. I spent whole day, trying to solve an issue with ghost clusters and this finally worked! Would have never thought of this solution myself.
Mitch saving GoogleMap in view model, me saving Google Maps in Google folder on my home screen (drake meme)
You will probably need to wrap it in a UIVIewRepresentable
I hope to see adopting qr scanner in compose.
Hey Mitch, I just want to ask you if you can show us the way you prefer learning a new platform, just like compose and now the ios app development. Is it by trying out different features in the docs? Or by building some practice app? Maybe you can make a vlog about that?
Cause I'm kind of in the middle of learning compose rn, and I'd love to know what's your way of learning new programming stuff. Please and thank you.
Similar idea to how you wrapped the GoogleMap in a AndroidView for compose
No bleeps love it
Just wanna say that the audio quality is just insane. Also, the bg music is so cozy. I could watch vlogs like these all day (if only I had time).
Hey, great vlog! I think that since the GoogleMap object is more of a part of the ViewModel than the view itself since it contains "state" and view. I have two questions:
1. Since you initially wanted to keep the GoogleMap object in the composable itself, did you consider using remember/rememberSaveable functions?
2. What do you think about Google Maps android library not receiving any updates in such a long time? It seems like it's an abandoned project. Very strange to me.
Actually it's being worked on a lot it seems
developers.google.com/maps/documentation/android-sdk/v310-beta
developers.google.com/maps/documentation/android-sdk/ktx
developers.google.com/maps/documentation/android-sdk/utility
Did not use remember because rotation would cause issues.
Recently i was watching the video about checking internet connection pinging google, so i thought is it gonna work in China? as i know google is banned there.
Prob not lol
If you don't need different layouts for landscape/portrait, setting activity manifest tag attribute android:configChanges="orientation|screenSize|screenLayout|keyboardHidden" will save you a lot of pain. And if you do need custom layouts, you can use ConstraintLayout or MotionLayout to rearrange your views easily.
Ya I thought about it honestly but didn't want to take the easy way out
Btw this is jetpack compose If you didn't know
Hey Mitch, I would love to see how to download a file or an image over network in your upcoming KMM videos, and especially how to represent it as a common model/data type in the common module.
I don't have downloading but I have videos about uploading images to a server in a previous course. codingwithmitch.com/courses/powerful-android-apps-with-jetpack-architecture/
What do you use to mirror ur phone on ur mac?
vysor
wait how do you do a bottom sheet in compose with using another fragment?
I built it myself
@@codingwithmitch will you share that in some video?
@@zohaib9381 ya because it was painful. The BottomSheetScaffold doesn't work properly when a google map is in the background so I had to build one from scratch with my own animations and everything
Totally agree! Ever tried having a ModalBottomSheetLayout where you can change sheet content dynamically using Compose? That's also very tricky😟
Ya the bottom sheet doesn't work properly I'm building my own
Chet,Tor and Romain has invited u to Android Developers Backstage podcast
prove it