Improve openUrlInExternalApp API and move url to UnifiedPushConfig
This commit is contained in:
parent
a89dde2bb4
commit
565e5ce87d
3 changed files with 5 additions and 4 deletions
|
|
@ -156,10 +156,9 @@ fun Context.startSharePlainTextIntent(
|
|||
fun Context.openUrlInExternalApp(
|
||||
url: String,
|
||||
errorMessage: String = getString(R.string.error_no_compatible_app_found),
|
||||
inNewTask: Boolean = false,
|
||||
) {
|
||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||
if (inNewTask) {
|
||||
if (this !is Activity) {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue