[英]how can i access any folder in android 11
this is how I was accessing folders before Android 11.**这就是我在 Android 11 之前访问文件夹的方式。**
File someFolder = new File(Environment.getExternalStorageDirectory() + "/somefolder);
but this method not working(deprecated) in android 11.但此方法在 android 11 中不起作用(已弃用)。
getExternalFilesDir () - this method returns the application's folder. getExternalFilesDir () - 此方法返回应用程序的文件夹。 Android/data/someApp安卓/数据/someApp
permissions:权限:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
Is there any way you can suggest?你有什么办法可以建议吗?
I don't exactly know if it's what you mean but you can try to look for the next: Android getFileDir vs getDir我不完全知道这是否是您的意思,但您可以尝试寻找下一个: Android getFileDir vs getDir
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.