I want to get an integer from a Cursor returned from a SQLite query, but I know the integer may be null. Unfortunately I can't find any Cursor method allowing me to check this.
The code will be
mModifiedDate = cursor.getInt(cursor.getColumnIndex(MODIFIED_DATE));
there is an
isNull()-method, just use if beforehand to detect null-values. Remember: It is quite common for methods that return a boolean to be named
isX() instead of
getX(), it can be the source of some confusion :)