How do I check to see how much space (in MB or GB) is left on the Android device? I am using Java and Android SDK 2.0.1.
Is there a system service that would expose something like this?
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.
Try this code:
Explanation
getBlockCount()– return size of SD card;getAvailableBlocks()– return the number of blocks that are still accessible to normal programs (thanks Joe)