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;

import android.os.Environment;

public class Main {

    public static Bitmap getBitmapFromLocal(String fileName) {
        Bitmap bitmap = null;
        String pathName = Environment.getExternalStorageDirectory() + "/boc_container/" + fileName;
        File file = new File(pathName);
        if (file.exists()) {
            bitmap = BitmapFactory.decodeFile(pathName);
        }
        return bitmap;
    }
}