Android App which uses SQLite Database to store and retrieve data.
-
Add new data
-
Update existing data
-
Update single, multiple or all the fields present in the database
-
Delete data
-
View data
-
Automatic Date and Time insertion
-
Easy to implement and make changes
-
Android OS and Wear OS Notifications with vibration and sound.
-
Just copy the code and classes to your project or
-
Import project to android studio
If you want to add or remove columns from table:
-
You need to add or remove column name from the "create table" query.
-
Update the version of the database which can be found in DatabaseHelper.java
public DatabaseHelper(Context context) {
super( context, DATABASE_NAME, null, 2 );
}
Here, integer 2 mentions the version.
- After adding columns update AddData() or updateData() methods so that they can accept values for the extra columns.
public boolean instertData(String name, String surname, String marks, String date){
// Rest of the code
}
- Add new column in ContentValues for inserting or updating the values in database.
contentValues.put( "Column name which is defined in database", "value of the method which you need to insert in the column of DB, For eg. name" );
That's it! It's a very simple app which helps you in understanding the concept of implementing SQLite Database in an Android application.
You are free to use this app for your project.