我有一个带有 intent 过滤器的应用程序,可以打开一些 web url。它适用于链接 (www.butterflytv.net/player.php?streamUrl=...) 和下面的 Intent 过滤器
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.butterflytv.net"
android:pathPattern="/player.php.*"
android:scheme="http" />
<data
android:host="butterflytv.net"
android:pathPattern="/player.php.*"
android:scheme="http" />
</intent-filter>
但是,当此链接位于推文中时,Twitter 应用内浏览器会打开该链接。我希望 Android 打开一个应用程序选择器来打开链接。你知道怎么做吗?
先谢谢你, A. 奥古兹
最佳答案
使用此代码:
startActivity(Intent.createChooser(sharingIntent, "Share using"));
这将让您选择打开链接的应用程序。
关于android - Android 应用内浏览器的推特禁用打开与 native 应用程序的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33074472/