Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.File; public class Main { public static boolean isFileBiggerThan1MB(String filePath) { File f = new File(filePath); Bitmap bitmap; bitmap = BitmapFactory.decodeFile(filePath); int MAX_IMAGE_SIZE = 1000 * 1024; int streamLength = (int) f.length(); return streamLength >= MAX_IMAGE_SIZE; } }