I am using Environment.getExternalStorageDirectory() to create a file and I will need to know if there is enough space available before I create and store the file.
If you can cite the Android Ref doc, that would be helpful too.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to use the StatFs Class. Here is an example of how to use it taken from the source code to the Settings application found on the phone.