Cursor getInt - Get the value of an Column as an Integer

Cursor getInt was added in API Level 1
public abstract int getInt (int columnIndex)

Returns the value of the requested column as an int.
The result and whether this method throws an exception when the column value is null, the column type is not an integral type, or the integer value is outside the range [Integer.MIN_VALUE, Integer.MAX_VALUE] is implementation-defined.
Parameters: columnIndex the zero-based index of the target column.
Returns: the value of that column as an int.

1. Move the Cursor to the First Row of a Cursor named myCursor.

2. Add the below line right after if (myCursor.moveToFirst()) { where the // myCursor moved to the first record comment is located. This will save the contents of the column _ID of an audio file to an integer named myInt

int myInt = cursor.getInt(cursor.getColumnIndex(android.provider.MediaStore.Audio.Media._ID));

3. Compile and run! 

4. Other column names for MediaStore Audio files are listed here

http://developer.android.com/reference/android/database/Cursor.html#getInt(int)