android浏览器如何打开本地html文件...
时间:2010-08-19 来源:JavaTiger427
用下面的代码就可以实现:
Intent intent=new Intent();
intent.setAction("android.intent.action.VIEW");
Uri CONTENT_URI_BROWSERS = Uri.parse("content://com.android.htmlfileprovider/sdcard/123.html");
intent.setData(CONTENT_URI_BROWSERS);
intent.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
startActivity(intent);
假设要打开的本地html文件存放在如下路径 /sdcard/123.html
相关阅读 更多 +