I'd like to check if my table has records. Here's what I've tried:
if( cursor != null ){ cursor.moveToFirst(); if (cursor.getInt(0) == 0) { Toast.makeText(getBaseContext(), "No records yet!", Toast.LENGTH_SHORT).show(); } } Logcat says:
CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0 Any help is appreciated. Thanks.