i have this code :
private void insertValus() {
ContentValues initialValues = new ContentValues();
for (int i = 0 ; i < COUNTRIES.length ; i++){
Character tmp = (Character)COUNTRIES[i].charAt(0);
initialValues.put(VALUE, COUNTRIES[i]);
initialValues.put(TYPE, "country");
initialValues.put(LETTER,tmp.toString(tmp));
db.insert(TABLE_NAME, null, initialValues);
}
}
public boolean existInDataBase(String userChoice) {
boolean returnval = true;
//gameList[0]
Cursor cursor = db.query(TABLE_NAME, new String[] {VALUE}
,VALUE+" like " + "'%"+ userChoice +"%'", null, null, null, null);
if (cursor != null)//i always enter here even if the string is no country
returnval = false;
return returnval;
and what ever i insert even if the query result should b false(meanning cursor == null)
and two more question
how can i see the database that i have build in the emulator??
2.should i run him outside my app and then to append it to my app or in first compiltion at user he will suffer a little overhead in the first time he use this app?