Skip to content

Instantly share code, notes, and snippets.

@tikitikipoo
Created January 5, 2012 01:33
Show Gist options
  • Save tikitikipoo/1563228 to your computer and use it in GitHub Desktop.
Save tikitikipoo/1563228 to your computer and use it in GitHub Desktop.
Androidにおけるデータベースのパスを取得
import java.io.File;
import android.os.Environment;
// ここではDBの名前がdatabase.dbを例にとる
File file = new File(Environment.getDataDirectory().getPath()
+ "/data/" + context.getPackageName()+ "/databases/database.db");
if (! file.exists()) {
// do something
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment