【发布时间】:2013-10-07 15:20:41
【问题描述】:
我有 youtube 按钮,它将打开一个 特定 *频道* 我希望它在 youtube 中打开strong> *application* 以便从我的应用程序访问频道。
Intent intent = new Intent(Intent.ACTION_VIEW , Uri.parse("https://www.youtube.com/channel/UCRmoG8dTnv0B7y9uoocikLw"));
context.startActivity(intent);
但它正在浏览器中打开。
【问题讨论】:
-
试试这个 startActivity(new Intent("android.intent.action.VIEW", Uri.parse("url")));
-
@Rohit 与 OP 的代码完全相同吗?
-
试试这个android.intent.action.VIEW