android intent打开各种文件(txt、apk、ppt,flutter下载功能

Intent intent;
switch (v.getId()){
case R.id.button_txt:
filePath = “/storage/emulated/0/hello2.txt”;
intent = FileUtils.openFile(this,filePath);
startActivity(intent);
break;
case R.id.button_apk:
filePath = “/storage/emulated/0/app-debug.apk”;
intent = FileUtils.openFile(this,filePath);
startActivity(intent);
break;
case R.id.button_ppt:
filePath = “/storage/emulated/0/新建 PPT 演示文稿.ppt”;
intent

android intent打开各种文件(txt、apk、ppt,flutter下载功能最先出现在Python成神之路

版权声明:
作者:ht
链接:https://www.techfm.club/p/7963.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>