Android:从应用程序内部启动Firefox [英] Android: Launch Firefox from within application
本文介绍了Android:从应用程序内部启动Firefox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只是想知道是否有人知道启动Firefox的移动浏览器的正确意图.我在任何地方都找不到它,所以我希望这里的人会知道. 谢谢
just wondering if anyone know the correct intent to launch Firefox's Mobile Browser. I can't find it anywhere, so I was hoping someone here would know. Thanks
推荐答案
这将为Firefox创建一个意图:
This will create an intent for Firefox:
String url = "http://example.com/";
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(new ComponentName("org.mozilla.firefox", "org.mozilla.firefox.App"));
intent.setAction("org.mozilla.gecko.BOOKMARK");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.putExtra("args", "--url=" + url)
intent.setData(Uri.parse(url));
这篇关于Android:从应用程序内部启动Firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文