I am facing some storage issue. i am working on an application where i have to access phone's on board external storage and an External sdCard storage which i am getting with this code
Environment.getExternalStorageDirectory();
But when onBoard external memory exists then this code returns the path of onBoard memory not the external sdCard while the sdCard is mounted
now the problem is.. i want to access both memories onBoard and external sdcard is there any way to access both memories
Users can see which apps have the READ_EXTERNAL_STORAGE permission in system settings. On the Settings > Privacy > Permission manager > Files and media page, each app that has the permission is listed under Allowed for all files. If your app targets Android 11, keep in mind that this access to "all files" is read-only.
External storage is often used to store information that's accessed less frequently by applications running on a desktop, laptop, server or mobile device, such as an Android or iOS smartphone or tablet.
Try out this:
String m_str = Environment.getExternalStorageDirectory()
.getAbsolutePath().toString(); //return path sdcard/mnt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With