如何在我的Android应用程序中打开ppt文件
问题描述:
我必须在没有其他应用程序帮助的情况下在我的应用程序中打开powerpoint(ppt)文件。
是否有 PPT-Viewer 我可以集成到我的应用程序中的小部件。
在我的应用程序中,我从用户那里获取幻灯片编号并向他显示相应的幻灯片。
Happy Coding!
I have to open powerpoint(ppt) file in my app without the help of another application.
Is there any PPT-Viewer widget which i can integrate into my app.
In my app i take slide number from the user and show him the corresponding slide.
Happy Coding!
答
在这里你去:
Here you go:
File file = new File("path_to_the_file.ppt");
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file),"application/vnd.ms-powerpoint");
startActivity(intent);
这将显示用户有关他们已安装的任何电源点查看器的选项以及它们可以选一个。
This will show the user options about any power-point viewers that they have installed and they can pick one.