Posts

Android Login and Register with SQLite Database Tutorial

Image
Lets’s Start with Android SQLite Database. Step 1  – Create a new project in Android Studio 3.0 and select empty Activity, i am going to name the project LoginDatabase. Step 2 –  First of all we need a class which manage our SQLite Database and table. Create a new class in your project and call it  SQLiteDBHelper.   Our class will extends with   SQLiteOpenHelper  class ,  this class will implements two primary override methods for handling and managing our database. @Override public void onCreate(SQLiteDatabase sqLiteDatabase) {...} @Override public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {...} Creating Schema Database Schema define how database is organize, it is  just like a SQL statements you use to create database and table.  Now Open  SQLiteDBHelper   class and modify its code looks like mine, make sure to extends with  SQLiteOpenHelper  class SQLiteDBHelper.java   public class SQLiteDBHelper extends SQ