叼花硬汉 2010-06-09 09:21 采纳率: 0%
浏览 256
已采纳

发送意图到浏览器打开特定的 URL [重复]

This question already has an answer here:

I'm just wondering how to fire up an Intent to the phone's browser to open an specific URL and display it.

Can someone please give me a hint?

</div>

转载于:https://stackoverflow.com/questions/3004515/sending-an-intent-to-browser-to-open-specific-url

  • 写回答

10条回答 默认 最新

  • ℡Wang Yan 2010-06-09 09:26
    关注

    To open a URL/website you do the following:

    String url = "http://www.example.com";
    Intent i = new Intent(Intent.ACTION_VIEW);
    i.setData(Uri.parse(url));
    startActivity(i);
    

    Here's the documentation of Intent.ACTION_VIEW.


    Source: Opening a URL in Android's web browser from within application

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(9条)

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码