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.content.Context;

public class Main {
    /**
     * check SQLite DB status
     * @param context Context
     * @param dbName database name
     * @return true == exist, false == not exist 
     */
    public static boolean doesDatabaseExist(Context context, String dbName) {
        File dbFile = context.getDatabasePath(dbName);
        return dbFile.exists();
    }
}