如何通过 Intent.ACTION_GET_CONTENT 只获取 .pptx(MS - powerpoint) 文件
How to get only .pptx(MS - powerpoint) file through Intent.ACTION_GET_CONTENT
我尝试使用以下代码,但它向我显示了选择中的所有类型的文件。我只希望文件选择器菜单仅显示 .pptx(Powerpoint) 文件。
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("application/pptx");
startActivityForResult(intent, PICK_DOC_REQUEST_CODE);
不胜感激!
我刚刚通过设置以下 mime 类型自己找到了解决方案。
intent.setType("application/vnd.openxmlformats-officedocument.presentationml.presentation");
它就像一个魅力!
我尝试使用以下代码,但它向我显示了选择中的所有类型的文件。我只希望文件选择器菜单仅显示 .pptx(Powerpoint) 文件。
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("application/pptx");
startActivityForResult(intent, PICK_DOC_REQUEST_CODE);
不胜感激!
我刚刚通过设置以下 mime 类型自己找到了解决方案。
intent.setType("application/vnd.openxmlformats-officedocument.presentationml.presentation");
它就像一个魅力!