我正在创建一个Sqlite database
,当我想看到那个时候database
使用File_Explorer
它时,我没有在那个位置得到它,那里只有两个文件夹:
Cache
,,lib
但是database
那里没有文件夹,但关键是我location
也得到了它, 通过LOGS
,
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_db__creation);
database db = new database(this);
}
// -- SqliteOpenHelper class ( extended )!
public database( Context context )
{
super(context, "New_one.db" , null , 2 );
Log.i("2nd class : constructor","tushar");
Log.i(context.getDatabasePath("New_one.db").toString(),"tushar");
//(data base location )
///data/data/com.example.database_creation/databases/New_one.db
}
public void onCreate(SQLiteDatabase db)
{
Log.i("2nd class : onCreate", "tushar");
db.execSQL("create table timerecords " +"(id integer primary key, time text, notes text)");
}
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
{
}