diff options
Diffstat (limited to 'app/src/main/java/org/pacien')
-rw-r--r-- | app/src/main/java/org/pacien/tincapp/context/App.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/context/App.kt b/app/src/main/java/org/pacien/tincapp/context/App.kt index 4a4a475..d79ae3e 100644 --- a/app/src/main/java/org/pacien/tincapp/context/App.kt +++ b/app/src/main/java/org/pacien/tincapp/context/App.kt | |||
@@ -35,7 +35,10 @@ class App : Application() { | |||
35 | .create().apply { window.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR) }.show() | 35 | .create().apply { window.setType(WindowManager.LayoutParams.TYPE_SYSTEM_ERROR) }.show() |
36 | } | 36 | } |
37 | 37 | ||
38 | fun openURL(url: String) = | 38 | fun openURL(url: String) { |
39 | appContext?.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) | 39 | val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) |
40 | val chooser = Intent.createChooser(intent, getResources().getString(R.string.action_open_web_page)) | ||
41 | appContext?.startActivity(chooser.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) | ||
42 | } | ||
40 | } | 43 | } |
41 | } | 44 | } |