Android: Launch Firefox from within application

后端 未结 2 801
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-05 10:20

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

2条回答
  •  长情又很酷
    2021-01-05 10:50

    Try this code:

     Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
     intent.setComponent(new ComponentName("org.mozilla.firefox", "org.mozilla.firefox.App"));
     this.startActivity(intent);
    

提交回复
热议问题