- android中调用浏览器的代码
- http://www.2cto.com/kf/201111/109800.html
-
默认的浏览器都列出让用户选择的
Java代码
Uri u = Uri.parse(url);
Intent it = new Intent(Intent.ACTION_VIEW, url); TestActivity.this.startActivity(it);
Uri u = Uri.parse(url);
Intent it = new Intent(Intent.ACTION_VIEW, url); TestActivity.this.startActivity(it);
指定浏览器的
Java代码
Uri u = Uri.parse(url);
it.setData(u);
it.setAction( Intent.ACTION_VIEW);
it.setClassName("com.android.browser","com.android.browser.BrowserActivity");
TestActivity.this.startActivity(it);
摘自hellorheaven