Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.File;

import android.graphics.Bitmap;

import android.graphics.BitmapFactory;

public class Main {
    public static Bitmap getBitmapFromSD(String path) {
        Bitmap bitmap = null;
        try {
            File file = new File(path);
            if (file.exists()) {
                bitmap = BitmapFactory.decodeFile(path);
            }
        } catch (Exception e) {
            // TODO: handle exception
        }
        return bitmap;
    }
}