//android获取一个用于打开PPT文件的intent Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.DEFAULT"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri uri = Uri.fromFile(new File(param )); intent.setDataAndType(uri, "application/vnd.ms-powerpoint"); //android获取一个用于打开Excel文件的intent public static Intent getExcelFileIntent( String param ) { Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.DEFAULT"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri uri = Uri.fromFile(new File(param )); intent.setDataAndType(uri, "application/vnd.ms-excel"); return intent; } //android获取一个用于打开Word文件的intent Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.DEFAULT"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri uri = Uri.fromFile(new File(param )); intent.setDataAndType(uri, "application/msword"); //android获取一个用于打开CHM文件的intent Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.DEFAULT"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri uri = Uri.fromFile(new File(param )); intent.setDataAndType(uri, "application/x-chm"); //android获取一个用于打开文本文件的intent Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.DEFAULT"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri uri1 = Uri.parse(param ); intent.setDataAndType(uri1, "text/plain"); //android获取一个用于打开PDF文件的intent Intent intent = new Intent("android.intent.action.VIEW"); intent.addCategory("android.intent.category.DEFAULT"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Uri uri = Uri.fromFile(new File(param )); intent.setDataAndType(uri, "application/pdf");
写道
//{后缀名,MIME类型}
{".3gp", "video/3gpp"},
{".apk", "application/vnd.android.package-archive"},
{".asf", "video/x-ms-asf"},
{".avi", "video/x-msvideo"},
{".bin", "application/octet-stream"},
{".bmp", "image/bmp"},
{".c", "text/plain"},
{".class", "application/octet-stream"},
{".conf", "text/plain"},
{".cpp", "text/plain"},
{".doc", "application/msword"},
{".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
{".xls", "application/vnd.ms-excel"},
{".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
{".exe", "application/octet-stream"},
{".gif", "image/gif"},
{".gtar", "application/x-gtar"},
{".gz", "application/x-gzip"},
{".h", "text/plain"},
{".htm", "text/html"},
{".html", "text/html"},
{".jar", "application/java-archive"},
{".java", "text/plain"},
{".jpeg", "image/jpeg"},
{".jpg", "image/jpeg"},
{".js", "application/x-javascript"},
{".log", "text/plain"},
{".m3u", "audio/x-mpegurl"},
{".m4a", "audio/mp4a-latm"},
{".m4b", "audio/mp4a-latm"},
{".m4p", "audio/mp4a-latm"},
{".m4u", "video/vnd.mpegurl"},
{".m4v", "video/x-m4v"},
{".mov", "video/quicktime"},
{".mp2", "audio/x-mpeg"},
{".mp3", "audio/x-mpeg"},
{".mp4", "video/mp4"},
{".mpc", "application/vnd.mpohun.certificate"},
{".mpe", "video/mpeg"},
{".mpeg", "video/mpeg"},
{".mpg", "video/mpeg"},
{".mpg4", "video/mp4"},
{".mpga", "audio/mpeg"},
{".msg", "application/vnd.ms-outlook"},
{".ogg", "audio/ogg"},
{".pdf", "application/pdf"},
{".png", "image/png"},
{".pps", "application/vnd.ms-powerpoint"},
{".ppt", "application/vnd.ms-powerpoint"},
{".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"},
{".prop", "text/plain"},
{".rc", "text/plain"},
{".rmvb", "audio/x-pn-realaudio"},
{".rtf", "application/rtf"},
{".sh", "text/plain"},
{".tar", "application/x-tar"},
{".tgz", "application/x-compressed"},
{".txt", "text/plain"},
{".wav", "audio/x-wav"},
{".wma", "audio/x-ms-wma"},
{".wmv", "audio/x-ms-wmv"},
{".wps", "application/vnd.ms-works"},
{".xml", "text/plain"},
{".z", "application/x-compress"},
{".zip", "application/x-zip-compressed"},
{"", "*/*"}
};
{".3gp", "video/3gpp"},
{".apk", "application/vnd.android.package-archive"},
{".asf", "video/x-ms-asf"},
{".avi", "video/x-msvideo"},
{".bin", "application/octet-stream"},
{".bmp", "image/bmp"},
{".c", "text/plain"},
{".class", "application/octet-stream"},
{".conf", "text/plain"},
{".cpp", "text/plain"},
{".doc", "application/msword"},
{".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},
{".xls", "application/vnd.ms-excel"},
{".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},
{".exe", "application/octet-stream"},
{".gif", "image/gif"},
{".gtar", "application/x-gtar"},
{".gz", "application/x-gzip"},
{".h", "text/plain"},
{".htm", "text/html"},
{".html", "text/html"},
{".jar", "application/java-archive"},
{".java", "text/plain"},
{".jpeg", "image/jpeg"},
{".jpg", "image/jpeg"},
{".js", "application/x-javascript"},
{".log", "text/plain"},
{".m3u", "audio/x-mpegurl"},
{".m4a", "audio/mp4a-latm"},
{".m4b", "audio/mp4a-latm"},
{".m4p", "audio/mp4a-latm"},
{".m4u", "video/vnd.mpegurl"},
{".m4v", "video/x-m4v"},
{".mov", "video/quicktime"},
{".mp2", "audio/x-mpeg"},
{".mp3", "audio/x-mpeg"},
{".mp4", "video/mp4"},
{".mpc", "application/vnd.mpohun.certificate"},
{".mpe", "video/mpeg"},
{".mpeg", "video/mpeg"},
{".mpg", "video/mpeg"},
{".mpg4", "video/mp4"},
{".mpga", "audio/mpeg"},
{".msg", "application/vnd.ms-outlook"},
{".ogg", "audio/ogg"},
{".pdf", "application/pdf"},
{".png", "image/png"},
{".pps", "application/vnd.ms-powerpoint"},
{".ppt", "application/vnd.ms-powerpoint"},
{".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"},
{".prop", "text/plain"},
{".rc", "text/plain"},
{".rmvb", "audio/x-pn-realaudio"},
{".rtf", "application/rtf"},
{".sh", "text/plain"},
{".tar", "application/x-tar"},
{".tgz", "application/x-compressed"},
{".txt", "text/plain"},
{".wav", "audio/x-wav"},
{".wma", "audio/x-ms-wma"},
{".wmv", "audio/x-ms-wmv"},
{".wps", "application/vnd.ms-works"},
{".xml", "text/plain"},
{".z", "application/x-compress"},
{".zip", "application/x-zip-compressed"},
{"", "*/*"}
};
相关推荐
在IT领域,尤其是在文档处理和数据管理中,能够在线或本地读取各种文件格式,如Word、PPT、PDF、Excel以及Doc等,是至关重要的技能。这些文件格式广泛应用于日常工作、学术研究和项目协作中,因此理解如何有效读取和...
1、文件浏览(支持pdf/ppt/doc/excel/txt) 2、文件上传(JS) 3、文件下载 4、Android与JS交互 5、自定义交互(进度条、下拉回弹) 6、视频播放 1、添加依赖和配置 根目录build.gradle文件添加如下配置: ...
在iOS平台上,开发人员经常需要处理各种文档类型的读取,如DOC、XLS、TXT、PPT和PDF等。这些文档格式广泛应用于商务、教育和个人资料分享,因此为iOS应用添加文档阅读功能至关重要。本教程将详细介绍如何使用Quick...
【标题】:“JSP学生网上选课系统设计”是一份基于Java Server Pages(JSP)技术的毕业设计项目,包含了完整的源代码、论文文档以及答辩使用的PPT。这个系统主要目的是实现一个方便、高效的在线选课平台,让学生能够...
例如,使用Aspose.Cells来读取Excel文件,Aspose.Words处理Word文档,Aspose.Slides用于PPT,而Aspose.Pdf用于PDF文件。 3. **编码设置**:针对可能出现的乱码问题,设置正确的字符编码。比如在读取Excel文件时,...
APP创业计划书.doc APP移动应用[社区通]商业计划书.ppt APP项目商业计划书(融资成功案例范文).pdf “四川美食”安卓应用程序APP-产品开发策划书.doc 【出行用车】叮当巴士.商业计划书.pdf 互助电动公交车可行性8.09...
- 使用Android Studio的布局设计工具,如XML布局,来创建聊天界面、个人信息页面、好友列表等界面。 - 应用Material Design设计规范,提供良好的用户体验和视觉一致性。 - 实现滑动刷新和下拉加载更多功能,以...
在C#编程环境中,处理各种类型的文件,如txt、Word(doc或docx)、Excel(xls或xlsx)和PowerPoint(ppt或pptx)文件,是常见的任务。这些文件格式通常用于存储文本、表格和演示文稿数据。下面将详细阐述如何在C#中...
中间层提供具有一定灵活性和控制权的服务,如Google App Engine;底部则是基础设施级别的服务,如Amazon EC2,它们提供了高度自定义和扩展性的计算资源。 云计算的发展历程从“网络就是计算机”到“网格计算”再到...
当Word iOS应用需要调用第三方应用来打开PPT或DOC文件时,这就涉及到了URL Scheme的使用。本篇将详细介绍如何在Objective-C中实现这一功能。 首先,我们需要理解URL Scheme是什么。URL Scheme是一种特殊的URI(统一...
XX抢车位APP项目计划书.ppt “互联网 ”大学生创新创业项目策划书--“乐享”农产品交流APP开发项目.pptx “助巢”APP创业计划书.doc “四川美食”手机应用程序APP产品开发策划书.doc “心知”APP-创业计划书.wps ...
4. **加载PDF文件**:使用PDF.js的`PDFViewerApplication.open()`方法加载PDF文件。你需要传递PDF的URL或者base64编码的数据。 5. **渲染PDF**:PDF.js会自动处理渲染过程。你可能需要监听PDF.js的事件,例如`load`...
dcr, sr2,wdl,swf,rar, zip, arj, img, iso, 7z, ace, bz2, cab, gz, jar, lzh, tar, uue, z,ebx,eml,dwg, dxf, dwj,ppt,doc, rtf, wri, txt, css, ini, asm, asp, bas, bat, cls, cmd, cpp, dot, js, jsp, log, xlm...
在Android应用开发中,有时需要实现文件预览功能,尤其是对于PDF、Word、Excel和PPT等常见办公文档。为了高效地实现这一功能,开发者可以选择使用腾讯浏览服务(Tencent Browse Service,简称TBS)提供的SDK。以下是...
1. **打开PPT文件**:首先,确保安装了PowerPoint2007或更高版本,使用该软件打开您想要转换成PDF格式的PPT文件。 2. **选择“Office按钮”**:点击界面上方的“Office按钮”,这通常位于屏幕左上角。 3. **选择...
完成上述步骤后,你需要重启计算机或重新打开文件资源管理器,以使更改生效。现在,你应该能在右键菜单中看到新建DOC格式文档的选项。 此外,对于其他老版格式如XLS(Excel 97-2003工作簿)和PPT(PowerPoint 97-...
6. **处理回调事件**:在使用WPS的过程中,需要监听各种回调事件,如打开、关闭、保存等,以便在事件发生时做出响应。 在实际开发中,`testThirdInterface.apk`可能是一个演示应用,用于展示如何与WPS API进行交互...
3. **PowerPoint文件(.ppt)**:PPT用于制作演示文稿,包含幻灯片、动画、音频和视频等元素。解析PPT通常使用Apache POI或Microsoft的API,转换成HTML时要处理图片、文本、布局以及可能的交互元素。 4. **PDF文件*...