android中调用浏览器的代码
默认的浏览器都列出让用户选择的
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
补充:移动开发 , Android ,