I\'ve met an unknown error while inserting data into the database. The LogCat had been display \"unable to insert data\", however, the code that I\'ve used is copied from anothe
AlertDialog.Builder builder = new AlertDialog.Builder(this);
don`t use "this" inside any click listener , because it refer current view instead of parent view. Try to use className.this like as follows...
AlertDialog.Builder builder = new AlertDialog.Builder(className.this);
You need to set the dbopener
as a global variable and move dbopener.close();
from OnStart()
to OnDestroy()
since you closed the DB before you insert the data