I have written a code to record audio and save it to below file location.
private String getFilename() {
String
My Android 6.0 allows me to browse the intern memory without the need for third party apps. I simply do this*:
* Words may not correspond to the standard English version ones, since I'm just freely translating them from Portuguese.
Note: At least in my phone, /storage/emulated/0
does not correspond to SD card, but to intern memory. This method did not work for my external card, but I never tried it with another phone.
Hope this helps!
https://productforums.google.com/forum/#!msg/nexus/WIcHUNQfRLU/ALpViG86AwAJ
Mr Expensive Toys said: Am amazed that this problem is still showing up as it started happening as far back as Honeycomb.
So, the /storage/emulated/0/DCIM/Camera is the same folder as your normal DCIM/Camera folder. Its just a symlink. So the files are actually in the right location you just have an app that put bad data into the MediaStore Database.
When accessing files from your PC your are actually enumerating the MediaStorage database for files. Its not pulling a traditional directory lists. So what you see is based on what is in that database and the path entries in the database. Files in the database pointing to emulated directories aren't shown as they are assumed to be duplicates as its the same physical directory as your normal DCIM/Camera. What is going on is that some poorly written third party apps are inserting entries into the database with the /storage/emulated/0/DCIM/Camera path instead of the proper root path to DCIM/Camera. Which means that the MTP service can't see them when you are hooked up to your PC.
Usually the easiest way to fix the problem is to just clear the MediaStore databases to get the bad entries out of the MediaStore Database and let the system reindex the files and put into the database with the proper paths.
Settings->apps Hit 3 dot menu in top right and select Show System Find Media Storage, Select it, Select Storage, then Clear Data Find External Storage, Select it , Select Storage, then Clear Data Turn phone off, turn phone back on, wait for indexer service to rebuild the data.
When you are done the files should show up with proper directory tree and be visible from the PC. Depending on amount of files on the phone it can take as 10-20 minutes to rebuild the media database as the service walks the phone directories, getting meta data, creating thumbnails, etc.
Here, it is found at /mnt/shell/emulated/0
View On-Device Files with Device File Explorer
https://developer.android.com/studio/debug/device-file-explorer
If you are using a simulator in Android Studio on Mac you can go to View -> Tool Windows -> Device File Explorer
. Here you can use a finder-like structure.
In Emulator, to view this file click on Settings>Storage>Other>Android>data>com.companyname.textapp>file>Download. Here, textapp is the name of the app you are working on.