跳转discord
This commit is contained in:
parent
8b37a63a4a
commit
58b33b9399
|
|
@ -34,11 +34,7 @@ class AndroidUtil private constructor() {
|
||||||
val appContext = BaseApp.appContext()
|
val appContext = BaseApp.appContext()
|
||||||
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||||
intent.flags = FLAG_ACTIVITY_NEW_TASK
|
intent.flags = FLAG_ACTIVITY_NEW_TASK
|
||||||
if (intent.resolveActivity(appContext.packageManager) != null) {
|
appContext.startActivity(intent)
|
||||||
appContext.startActivity(intent)
|
|
||||||
} else {
|
|
||||||
Toast.makeText(appContext, "No available browser", Toast.LENGTH_SHORT).show()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun openAppNotifySettings() {
|
fun openAppNotifySettings() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue