启动Android浏览器浏览器、Android

2023-09-04 04:24:09 作者:无关回忆

我需要如何开始通过code中的Andr​​oid浏览器的方向。 谢谢!

I need directions on how to start the android browser through code . Thanks !

推荐答案

如果你想有一个完全成熟的浏览器尝试使用:

If you want a fully blown browser try with :

   startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://Yoururl.com")));

看一看到ACTION_VIEW意图。

如果你想简单地显示一些HTML尝试使用的WebView :

If you want to simply display some HTML try using WebView:

WebView webview = new WebView(this);
setContentView(webview);
webview.loadUrl("http://yoururl.org/");