openUriOrElse

fun Context.openUriOrElse(uri: String, fallbackAction: (Exception) -> Unit)

Opens the given uri in a browser. If the uri is invalid or no browser is installed, fallbackAction is called.