Being new in Android, I am having trouble dealing with the following:
public String[] getContacts(){ Cursor cursor = getReadableDatabase().rawQuery(\"SELECT
use this:
if (cursor != null && cursor.getCount()>0){ cursor.moveToFirst(); do{ for(int i = 0; i < cursor.getCount(); i ++){ names.add(cursor.getString(i)); } }while(cursor.moveToNext()); } cursor.close();