默认的浏览器都列出让用户选择的
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);
posted on 2012-07-21 22:15
zhanghu198901 阅读(1655)
评论(1) 编辑 收藏