Android 当我使用Intent与Chrome共享url时,会多次显示“选择器”
我的代码:Android 当我使用Intent与Chrome共享url时,会多次显示“选择器”,android,google-chrome,Android,Google Chrome,我的代码: String youtube = "https://www.youtube.com/watch?v=Rk6_hdRtJOE"; Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(youtube)); startActivity(intent); 奇怪的是,这种情况只发生在Chrome上。如果我使用Opera或Firefox,我没有问题 有人知道会发生什么吗?如果Chrome不是默认浏览器,当站点重定向到移动版本时,它将
String youtube = "https://www.youtube.com/watch?v=Rk6_hdRtJOE";
Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(youtube));
startActivity(intent);
奇怪的是,这种情况只发生在Chrome上。如果我使用Opera或Firefox,我没有问题
有人知道会发生什么吗?如果Chrome不是默认浏览器,当站点重定向到移动版本时,它将再次显示选择器。您可以通过更改URL来避免这种情况
String youtube = "https://m.youtube.com/watch?v=Rk6_hdRtJOE";
谢谢非常简单的解决方案。