Try this:
(尝试这个:)
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);
That works fine for me.
(对我来说很好。)
As for the missing "http://" I'd just do something like this:
(至于缺少的“ http://”,我会做这样的事情:)
if (!url.startsWith("http://") && !url.startsWith("https://"))
url = "http://" + url;
I would also probably pre-populate your EditText that the user is typing a URL in with "http://".
(我还可能会预先填充您的EditText,即用户正在使用“ http://”输入URL。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…