Hey team! is there a library/article or youtube vi...
# multiplatform
e
Hey team! is there a library/article or youtube video to see how to implement a Share action in a Compose Multiplatform project? When clicking on share icon to share in different Apps in your device
p
For text I do the following but that requires a text containing an intent e.g. `mailto:youremail@gmail.com`:
Copy code
fun UriHandler.safeOpenUri(uri: String) {
    try {
        openUri(uri)
    } catch (exception: IllegalArgumentException) {
        Firebase.crashlytics.log("Unable to open URI: $uri")
        Napier.e("Unable to open URI: $uri", exception)
    }
}

val uriHandler = LocalUriHandler.current
uriHandler.safeOpenUri("Text to be shared...")
For image I do a combination of Capturable (to capture a screenshot) and FileKit (in order to share a file, follow the share dialog instructions here).
e
thanks!