Android浏览器如何打开本地html文件
16lz
2021-01-23
]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
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
更多相关文章
- android 导出签名APK--混淆文件proguard.cfg详解
- Android 在xml布局配置文件中给Button按钮添加事件
- Android在SDcard建文件夹(在Android中移动文件必用)
- android 获取路径目录方法 以及 获取路径方法
- Android Studio 配置快捷方式生成JNI头文件的方法
- android 安装文件例子
- android 读取DDMS里的文件时打不开,解决方法
- android配置文件详解