[英]how can i open discord server invite with intent based URI?
我想要在Android中打開Discord服務器。
我知道如何在Twitter上執行此操作,但無法正常工作
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("twitter://user?screen_name=username")));
} catch (Exception e) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/username")));
}
我通過測試不同的東西找到了我們,發現如果您安裝了不和諧的東西,則不需要明確指定任何內容,我按如下方式進行
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://discord.gg/invitecode")))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.