Java tutorial
//package com.java2s; // Use of this source code is governed by a BSD-style license that can be import android.os.Environment; public class Main { /** * Returns the number of free bytes on the storage. */ public static long getFreeSpaceInBytes() { return Environment.getDataDirectory().getUsableSpace(); } }