我完全可以生成一个PDF并将其存储在Android SDK的version=<28中的自定义文件夹中,但从Android10开始
customFolder = new File(getExternalStorageDirectory() + File.separator + "TimingNotezz");
customFolder.mkdirs();customFolder.mkdirs()为false,表示未创建文件夹,因此
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
{
//I want to implement the code to create and store contents in a custom directory specifically for
// Android 10 here
} 我该怎么做呢?提前谢谢。我希望有不同的建议。
发布于 2020-08-10 19:08:31
您可以使用Intent.ACTION_OPEN_DOCUMENT_TREE让用户选择存储位置。然后使用存储访问框架在其中创建您的"TimingNotezz“文件夹。还有您应该使用saf创建的文件。
https://stackoverflow.com/questions/63338611
复制相似问题