跳转discord

This commit is contained in:
renhaoting 2025-11-28 14:54:51 +08:00
parent 8b37a63a4a
commit 58b33b9399
1 changed files with 1 additions and 5 deletions

View File

@ -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() {