"Hi everyone, I'm wondering if there's a library a...
# multiplatform
p
"Hi everyone, I'm wondering if there's a library available for Kotlin Multiplatform (KMP) that replicates the sharing functionality similar to what Android offers. For example, in Android, we can share a link using
Intent shareIntent =Intent.createChooser(sendIntent, null); startActivity(shareIntent)
. Is there an equivalent approach or library in KMP for this purpose?"
p
What makes KMP spicy and trendy is that you can still do that in your same Android code. Just pass a delegate interface to KMP. From KMP invoke the onClick button that triggers this action. In the actual Android implementation, use this exact code. In iOS do the proper iOS code
p
I plan to follow the approach you've recommended. However, before I start coding from scratch, I'm curious to know if there exists a Kotlin Multiplatform (KMP) library that already addresses this specific issue?
p
I am not sure if one of the recommended navigation libraries support this type of system navigation. You can ask about this in #appyx or #decompose channels or PreCompose, Voyager or Circuit GitHub repos. I haven't seen anything yet but is possible some of this library manage that. But I am not aware of anything like this yet
p
Thanks for your suggestion @Pablichjenkov CC @Suresh Maidaragi
👍 1
j
If a closed source solution is OK for you, we have an Android-alike API for KMP; supports Intents, Activities, lifecycle etc. Happy to share a link, but I've pasted it recently here & don't want to spam 😉 - will DM you if you are interested?
👍 1
p
@Jan Holešovský It would be great if you could share the same.
j
Sent the link via DM
👎 1
p
@Jan Holešovský The resource you provided doesn't appear to be relevant to the specified problem. It seems like you might be promoting your product, which is not welcomed. 👎
j
I've asked if you were interested in closed source solution to your problem, you said you were, so I've sent you the info. It makes your original
Intent shareIntent =Intent.createChooser(sendIntent, null); startActivity(shareIntent)
compile and work on iOS, so I believe it is relevant. I'm sorry if you find it not helpful.