Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

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

public class Main {
    public static long FreeMemory() {
        StatFs statFs = new StatFs(Environment.getExternalStorageDirectory().getAbsolutePath());
        long Free = (statFs.getAvailableBlocksLong() * statFs.getBlockSize()) / 1048576;
        return Free;
    }
}