由文件的路径通过其他应用打开图片,PPT,Word,excel,PDF
来源:互联网 发布:淘宝代购海外直邮真假 编辑:程序博客网 时间:2024/04/28 17:31
1.打开图片
Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse("file://"+"/sdcard/test.jpg"),"image/*"); startActivity(intent);
2.打开PPT,Word,excel文件
Intent intent = new Intent(Intent.ACTION_VIEW); //intent.setDataAndType(Uri.parse("file://"+file_path),"application/vnd.ms-excel"); intent.setDataAndType(Uri.parse("file://"+file_path),"application/msword"); startActivity(intent);
3.打开PDF文件
File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/example.pdf");Intent intent = new Intent(Intent.ACTION_VIEW);intent.setDataAndType(Uri.fromFile(file), "application/pdf");intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);startActivity(intent);
0 0
- 由文件的路径通过其他应用打开图片,PPT,Word,excel,PDF
- android启动其他程序和打开pdf ppt word excel等文件
- 笔记-Android中打开各种格式的文件(apk、word、excel、ppt、pdf、音视频、图片等)
- Android中打开各种格式的文件(apk、word、excel、ppt、pdf、音视频、图片等)
- 笔记-Android中打开各种格式的文件(apk、word、excel、ppt、pdf、音视频、图片等)
- android打开pdf ppt word excel等文件
- android打开pdf ppt word excel chm html text 文件的intent
- android打开pdf ppt word excel chm html text 文件的intent
- Android执行打开文件(PDF,PPT,WORD,EXCEL,CHM,HTML,TEXT,AUDIO,VIDEO)的总结
- Android遍历获取Office格式(Word,Excel,PPT,PDF)的文件并打开
- Android应用内展示word、excel、pdf、ppt等文件
- 应用内展示word ,pdf, excel,ppt等文件
- Android应用内展示word、excel、pdf、ppt等文件(讯的Tbs)
- 通过调用第三方实现word,ppt,excel的打开
- MFC 打开word、ppt、pdf文件方法
- android用于打开各种文件的intent,包括以下文件PDF,PPT,WORD,EXCEL,CHM,HTML,TEXT等等
- android用于打开各种文件的intent,包括以下文件PDF,PPT,WORD,EXCEL,CHM,HTML,TEXT,AUDIO,VIDEO
- android用于打开各种文件的intent,包括以下文件PDF,PPT,WORD,EXCEL,CHM,HTML,TEXT,AUDIO,VIDEO
- linux下mysql安装
- 【无中生有】---15---分布式业务系统原子性控制
- jquey添加修改列表内容
- Android开发常用工具类
- sphinx+scws 全文检索使用之 sphinx配置文件详解
- 由文件的路径通过其他应用打开图片,PPT,Word,excel,PDF
- Mockito与PowerMock
- 回话跟踪技术Cookie
- 一个诡异的crontab执行提示1045错误码的MySQL问题定位
- 项目实践--跳动的小鸟
- 关于LeetCode中Implement strStr()一题的理解
- 动手写一个Android数据加载时界面状态切换的开源库
- {模板}网络流Dinic
- 分布式系统的思考及CAP理论