I see that there is a db.execSQL(“create table” ) command in the CrimeBaseHelper.java onCreate() function
How does the application only create the crimes table on the first run and not destroy that data on subsequent runs?
I am trying to duplicate this logic in my own application for school and am trying to figure out what code needs to be copied and where.
Should I just copy the entire database folder, and then change the names for my database file in the code?
private static final String DATABASE_NAME = “crimeBase.db”; public static final String NAME = “crimes”;
Thanks
Iscodex
I found the db file in the device monitor like you said
however, I cannot see the data in the db file - i.e. if I double click on the db file nothing happens
is that correct?
thanks
lscodex
August 9 |
Hello,
run the app and you can check .db file from Android Studio>Tools>Android>Android Device Monitor.
Then, you will see File Explorer tab in a right panel that contains a data folder.The data folder includes your db you created.
However, if you can’t open the data folder or you can’t see anything in the data folder, I will explain another solution.
The solution is complicated. So I thought it would be true to not explain here.
OR
you check your code again, also you will create a table in your db and complete the coding and before run app, you can check to using try catch statement.
Visit Topic or reply to this email to respond.
To unsubscribe from these emails, click here.