New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬 请教个问题 #2
Comments
上面那句代码 是项目里面打开 手机文件管理器的 为什么我原样复制到自己项目里 打开的效果 和您的这个项目打开的效果不一样呢 是还需要设置什么吗 |
老铁,你复制少了两个 * 了,复制可不能马虎。 val intent = Intent(Intent.ACTION_GET_CONTENT)
intent.setType("*/*") //这里是 */*
intent.addCategory(Intent.CATEGORY_OPENABLE)
this.startActivityForResult(
Intent.createChooser(intent, "选择文件"),
FilePickerConst.REQUEST_CODE_ALL_TYPE) |
不好意思大佬 我复制到这的时候 出错了 |
Intent intent = new Intent(Intent.ACTION_GET_CONTENT); |
你的代码在我这边直接提示 “没有应用可执行此操作”,你试试其他机型看看。 |
val intent = Intent(Intent.ACTION_GET_CONTENT)
intent.setType("/")
intent.addCategory(Intent.CATEGORY_OPENABLE)
this.startActivityForResult(
Intent.createChooser(intent, "选择文件"),
FilePickerConst.REQUEST_CODE_ALL_TYPE
The text was updated successfully, but these errors were encountered: