Java tutorial
//package com.java2s; import java.io.File; import android.util.Log; public class Main { private static String TAG = "DEFAC[Helpers]"; /** * * @param filename * @return */ public static long getFileSize(String filename) { File file = new File(filename); if (!file.exists() || !file.isFile()) { Log.e(TAG, "GETFILESIZE: File \"" + filename + "\" doesn\'t exist"); return -1; } return (file.length() / 1024); } }