Eduardo Ruesta
06/04/2025, 1:02 PMPavlos
06/04/2025, 1:33 PMfun 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).Eduardo Ruesta
06/04/2025, 1:39 PM