Do what the doc says: if no CustomChrome tab is available, try to open the Url in any installed browser.
This commit is contained in:
parent
3e5dd4bdfe
commit
f998d5b14c
1 changed files with 2 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ import android.net.Uri
|
|||
import androidx.browser.customtabs.CustomTabColorSchemeParams
|
||||
import androidx.browser.customtabs.CustomTabsIntent
|
||||
import androidx.browser.customtabs.CustomTabsSession
|
||||
import io.element.android.libraries.androidutils.system.openUrlInExternalApp
|
||||
|
||||
/**
|
||||
* Open url in custom tab or, if not available, in the default browser.
|
||||
|
|
@ -53,6 +54,6 @@ fun Activity.openUrlInChromeCustomTab(
|
|||
}
|
||||
.launchUrl(this, Uri.parse(url))
|
||||
} catch (activityNotFoundException: ActivityNotFoundException) {
|
||||
// TODO context.toast(R.string.error_no_external_application_found)
|
||||
openUrlInExternalApp(url)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue