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 total bytes on the storage. */ public static long getTotalSpaceInBytes() { return Environment.getDataDirectory().getTotalSpace(); } }