日期:2014-05-17  浏览次数:20707 次

Android浏览器如何打开本地html文件
]Android浏览器如何打开本地html文件

Android 2010-03-12 01:02:32 阅读74 评论0 字号:大中小
转自:http://hi.baidu.com/wangysh/blog/item/4aa1337fb9421e0128388a8a.html

Java语言: Codee#9727
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