㈠ android 代码打开ppt文件有什么办法
工具/原料
Android
android 代码打开ppt文件有什么办法
1
很简单,通过调用系统的intent,我们可以打开各种文件,不熟悉的朋友可以了解下action、datatype、uri的相关知识。
通用方法如下:
2
public static Intent openFile(String filePath){
File file = new File(filePath);
if(!file.exists()) return null;
/* 取得扩展名 */
String end=file.getName().substring(file.getName().lastIndexOf(".") + 1,file.getName().length()).toLowerCase();
/* 依扩展名的类型决定MimeType */
if(end.equals("m4a")||end.equals("mp3")||end.equals("mid")||
end.equals("xmf")||end.equals("ogg")||end.equals("wav")){
return getAudioFileIntent(filePath);
}else if(end.equals("3gp")||end.equals("mp4")){
return getAudioFileIntent(filePath);
}else if(end.equals("jpg")||end.equals("gif")||end.equals("png")||
end.equals("jpeg")||end.equals("bmp")){
return getImageFileIntent(filePath);
}else if(end.equals("apk")){
return getApkFileIntent(filePath);
}else if(end.equals("ppt")){
return getPptFileIntent(filePath);
}else if(end.equals("xls")){
return getExcelFileIntent(filePath);
}else if(end.equals("doc")){
return getWordFileIntent(filePath);
}else if(end.equals("pdf")){
return getPdfFileIntent(filePath);
}else if(end.equals("chm")){
return getChmFileIntent(filePath);
}else if(end.equals("txt")){
return getTextFileIntent(filePath,false);
}else{
return getAllIntent(filePath);
}
}
3
//Android获取一个用于打开APK文件的intent
public static Intent getAllIntent( String param ) {
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(android.content.Intent.ACTION_VIEW);
Uri uri = Uri.fromFile(new File(param ));
intent.setDataAndType(uri,"*/*");
return intent;
}
4
//Android获取一个用于打开APK文件的intent
public static Intent getApkFileIntent( String param ) {
Intent intent = new Intent();
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setAction(android.content.Intent.ACTION_VIEW);
Uri uri = Uri.fromFile(new File(param ));
intent.setDataAndType(uri,"application/vnd.android.package-archive");
return intent;
}
//Android获取一个用于打开VIDEO文件的intent
public static Intent getVideoFileIntent( String param ) {
Intent intent = new Intent("android.intent.action.VIEW");
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("oneshot", 0);
intent.putExtra("configchange", 0);
Uri uri = Uri.fromFile(new File(param ));
intent.setDataAndType(uri, "video/*");
return intent;
}
//Android获取一个用于打开AUDIO文件的intent
public static Intent getAudioFileIntent( String param ){
Intent intent = new Intent("android.intent.action.VIEW");
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("oneshot", 0);
intent.putExtra("configchange", 0);
Uri uri = Uri.fromFile(new File(param ));
intent.setDataAndType(uri, "audio/*");
return intent;
}
//Android获取一个用于打开Html文件的intent
public static Intent getHtmlFileIntent( String param ){
Uri uri = Uri.parse(param ).buildUpon().encodedAuthority("com.android.htmlfileprovider").scheme("content").encodedPath(param ).build();
Intent intent = new Intent("android.intent.action.VIEW");
intent.setDataAndType(uri, "text/html");
return intent;
}
//Android获取一个用于打开图片文件的intent
public static Intent getImageFileIntent( 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, "image/*");
return intent;
}
//Android获取一个用于打开PPT文件的intent
public static Intent getPptFileIntent( 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-powerpoint");
return intent;
}
//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
public static Intent getWordFileIntent( 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/msword");
return intent;
}
//Android获取一个用于打开CHM文件的intent
public static Intent getChmFileIntent( 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/x-chm");
return intent;
}
//Android获取一个用于打开文本文件的intent
public static Intent getTextFileIntent( String param, boolean paramBoolean){
Intent intent = new Intent("android.intent.action.VIEW");
intent.addCategory("android.intent.category.DEFAULT");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (paramBoolean){
Uri uri1 = Uri.parse(param );
intent.setDataAndType(uri1, "text/plain");
}else{
Uri uri2 = Uri.fromFile(new File(param ));
intent.setDataAndType(uri2, "text/plain");
}
return intent;
}
//Android获取一个用于打开PDF文件的intent
public static Intent getPdfFileIntent( 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/pdf");
return intent;
}
㈡ 苹果电脑制作的ppt怎么发送到安卓手机上打不开,怎么样能打开。改格式也不行。
看看你制作的ppt后缀名是什么,如果是.key那肯定打不开,需要回到苹果电脑上用 keynote打开,导出成.ppt或者.pptx才行。
㈢ 安卓盒子里有可以播放ppt的app吗
小米盒子可以播放PPT。 需要将PPT拷贝到盒子里或者连接u盘。 有两种方法播放ppt: 安装安卓版wps,然后在小米盒子上播放ppt,没试过,按说可以通过遥控器控制。 打开小米盒子的miracast,然后在手机上播放ppt,共享播放到小米上,这种情况控制是在手机上进行的
㈣ 怎么在安卓手机上播放带视频的PPT
手机office毕竟还只是个基础功能,目前达不到播放视频的水平,您可以手机下载万能播放器播放ppt里面的视频文件的,ppt里面视频文件需要单独提取播放
㈤ 安卓系统怎样播放ppt文件
播放ppt文件需要第三方文档处理类软件的支持
常用的有quick office
Document to Go
wps for android
办公套件等
都是免费的 都不错 LZ看喜好下一个就行
㈥ android开发:播放ppt
这牵涉到解码的问题,很复杂,现在已有的办公软件只做到了能播放,不能做到有动画。这还是个大工程,暂时解决不了,希望你能研究明白告诉我一声,我也开开眼。。。
祝你成功
㈦ 用手机wps做的ppt怎么发给别人
手机如何修改和发送PPT文件
如果电脑不在身边,查看和编辑PPT演示文件是很不方便的,今天给大家讲解如何用手机修改和发送PPT演示文件。
开启分步阅读模式
操作方法
01
首先在手机上下载安装“wps”。然后打开。
02
在wps中点击自己需要修改的PPT演示文件。
03
打开演示文件后,点击手机左上角的“编辑“,如图所示。
04
待编辑完成后,点击手机左下角的选项卡。
05
然后在出现的列表中点击"分享与发送“。
06
然后点击以文件发送。
07
在出现的发送列表中选择想要发送的程序,这里我们以QQ为例。
08
进入QQ后,我们选择好友或者发送到我的电脑,这里我们以发送到”我的电脑“为例,然后确定发送,显示发送成功。
QQ APP
本页搜狗指南内容仅供参考,请您根据自身实际情况谨慎操作。尤其涉及您或第三方利益等事项,请咨询专业人士处理。
0无帮助
大家都在搜
在手机上如何修改ppt
手机修改ppt用什么软件
手机上面怎么修改ppt
手机wps怎么修改ppt文件
手机上的ppt名称怎么修改
ppt文件怎么修改编辑
手机怎么修改ppt内容
ppt里的文字怎么修改
相关推荐
手机如何修改和发送excel文件
紫蝴蝶
游戏/数码
手机如何使用蓝牙发送文件
东方不败
游戏/数码
手机如何发送文件到电脑?
雨一直下
游戏/数码
android手机怎样通过蓝牙发送文件和接受文件
芳草
游戏/数码
如何修改和编辑PPT母版
追风少年
游戏/数码
2020年大专函授文凭查询
广告
正在加载
操作方法
01/08
操作方法
点击目录可快速跳转至页面对应位置
01首先在手机上下载安装“wps”。然后打开。
02在wps中点击自己需要修改的PPT演示文件。
03打开演示文件后,点击手机左上角的“编辑“,如图所示。
04待编辑完成后,点击手机左下角的选项卡。
05然后在出现的列表中点击"分享与发送“。
06然后点击以文件发送。
07在出现的发送列表中选择想要发送的程序,这里我们以QQ为例。
08进入QQ后,我们选择好友或者发送到我的电脑,这里我们以发送到”我的电脑“为例,然后确定发送,显示发送成功。
㈧ 安卓手机有可以播放ppt的软件吗
安卓智能机是可以下载播放ppt文件的软件的,具体方法为:
1、在安卓市场或者其他app商城下载wps等ppt播放软件。
2、安装后在设置里可以导入或下载ppt。
3、也可以自己新建制作ppt。
㈨ 安卓系统怎么导入PPT文件啊,系统里原来没有,想从电脑里导入到手机,请高手帮忙解答下,感激,很急
直接把文件放到SD卡中。
如果要在手机上阅读PPT文件
可以下载一个软件。Documents to go
㈩ 安卓系统如何使用PPT
1.5以上的系统可以找到很多,word、excel和ppt可以用Kingsoft Office(金山的wps),Documents To Go,google doc,open office,quick office……太多了