开发者

Load default android web browser

I am currently developing an android application. I want the user to select an item from a listview from and it loads the url that is assigned with the selected option in the default android browser instead of using a webview as that would mean that I would have to effectively ma开发者_如何学编程ke my own web browser.

Thanks for any help you can provide


You could do something like this:

Intent internet = new Intent(); 
internet.setAction(Intent.ACTION_VIEW); 
internet.addCategory(Intent.CATEGORY_BROWSABLE); 
internet.setData(Uri.parse("http://www.google.com")); 
startActivity(internet); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜