Android Memory Get FreeMemory()

Here you can find the source of FreeMemory()

Description

Free Memory

Declaration

public static int FreeMemory() 

Method Source Code

//package com.java2s;

import android.os.Environment;
import android.os.StatFs;

public class Main {
    public static int FreeMemory() {
        StatFs statFs = new StatFs(Environment
                .getExternalStorageDirectory().getAbsolutePath());
        int Free = (statFs.getAvailableBlocks() * statFs.getBlockSize()) / 1048576;
        return Free;
    }//w w w.  jav a 2  s. co m
}

Related

  1. TotalMemory()