Java tutorial
//package com.java2s; import android.content.Context; import android.database.sqlite.SQLiteDatabase; public class Main { private static final String DB_NAME = "area.db"; private static Context mContext; private static SQLiteDatabase getDataBase() { return SQLiteDatabase.openDatabase(getDBPath(), null, SQLiteDatabase.OPEN_READONLY); } private static String getDBPath() { return getContext().getFilesDir() + "/" + DB_NAME; } private static Context getContext() { return mContext; } }