I am creating an app blocking Application and would like to know a few things:
EditText
field or an AlertDialog
.CheckBox
next to them to select which
apps to carry over to another ListView
with all the installed apps.AlertDialog
with everything I need so far, just need
to know how to link that to create a new table and set the entered
text as the table name.I hope I've provided enough details or if this makes any sense at all. Thank you in advance and I hope someone will be able to help me with this problem. If needed I can post segments of my already existing code to make things easier?
For using a Android Database, I recommend to follow this tutorial:
Android | Simple SQLite Database Tutorial
After this tutorial you will understand how the android database works, how you can create tables:
@Override
public void onCreate(SQLiteDatabase db) {
// SQL statement to create book table
String CREATE_BOOK_TABLE = "CREATE TABLE books ( " +
"id INTEGER PRIMARY KEY AUTOINCREMENT, " +
"title TEXT, "+
"author TEXT )";
// create books table
db.execSQL(CREATE_BOOK_TABLE);
}
And how to
When you know all this you can create own methods to use!