Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.mantz_it.rfanalyzer.ui.screens

import android.content.Intent
import android.content.ActivityNotFoundException
import android.widget.Toast
import android.webkit.WebResourceRequest
import android.webkit.WebView
import android.webkit.WebViewClient
Expand Down Expand Up @@ -103,7 +105,11 @@ fun ManualScreen(navController: NavController, subUrl: String = "index.html") {
true
} else {
// Open external links in system browser
context.startActivity(Intent(Intent.ACTION_VIEW, url.toUri()))
try {
context.startActivity(Intent(Intent.ACTION_VIEW, url.toUri()))
} catch (e: ActivityNotFoundException) {
Toast.makeText(context, "No app found to open this link", Toast.LENGTH_SHORT).show()
}
true
}
}
Expand Down