Hello everyone, I'm learning Kotlin multiplatform ...
# multiplatform
j
Hello everyone, I'm learning Kotlin multiplatform and I want to add the functionality to open Instagram/Facebook/WhatsApp/Email applications in the device when I click in the social media images shown in the image. I know that in normal android development this is achieved with "intents", but I was wondering if there's already a multiplatform package/library that can help with this so I do not have to implement separate/specific logic for iOS/Android, and if not, can someone give me an example on how to implement it the multiplatform way? Thanks in advance.
a
You will need to create expect/actual implementations for that, on Android you'll use intents, for iOS you'll use the _iOS version of intents_(no idea what it is 😅 )
j
I'm having a lot of problems with the context needed for the "startActivity" method for the intent, do you know where can i find a good example on how to solve the context issue for multiplatform?
a
If you check this example, you see that he's using an intent to open an url
j
Thanks, I'm going to check it out, even tough I just managed (with the help of copilot xD) to prepare a context and made my first intent for email successfully (at least on android xD as i do not have a mac). Thanks again.