Being new in Android, I am having trouble dealing with the following:
public String[] getContacts(){
Cursor cursor = getReadableDatabase().rawQuery(\"SELECT
When cursor is returned from a database query it is placed at index -1 that is above the first entry of the cursor so, before using the cursor to get data you have move it to its first position. For that add
cursor.MoveToFirst();
after
Cursor cursor = getReadableDatabase().rawQuery("SELECT name FROM contacts", null);