1. Sdcard Path
Therefore, 'sdcard root path' to access the API must be used as follows.
=> File path = Environment.getExternalStorageDirectory();
2. Check Sdcard capacity
: Sdcard Data Write and the other when working on, to check if the pre-dose program, maybe better.
File sdcard_path = Environment.getExternalStorageDirectory();
StatFs stat = new StatFs(sdcard_path.getPath());
long blockSize = stat.getBlockSize();
long totalBlocks = stat.getBlockCount();
long availableBlocks = stat.getAvailableBlocks();
- Total capacity
long Total_Size = totalBlocks * blockSize;
- Available capacity
long Available_Size = availableBlocks * blockSize;
- Capacity is being used
long Used_Size = Total_Size * Available_Size;
3. Sdcard Permission Setting
: Sdcard needed for the Data Write operation is set.
In addition, inquiries, or questions, please contact us.