Code example for Cursor

Methods: closegetLonggetStringmoveToNext

0
        // Read the database directly.  We only do this once to initialize 
        // the members of this class. 
        Cursor cursor = db.query("CalendarMetaData", sCalendarMetaDataProjection,
                null, null, null, null, null); 
        try { 
            if (cursor.moveToNext()) {
                timezone = cursor.getString(METADATA_INDEX_LOCAL_TIMEZONE);
                minInstance = cursor.getLong(METADATA_INDEX_MIN_INSTANCE);
                maxInstance = cursor.getLong(METADATA_INDEX_MAX_INSTANCE);
            } 
        } finally { 
            if (cursor != null) {
                cursor.close();
            } 
        } 
 
        // Cache the result of reading the database 
        mFields.timezone = timezone;
        mFields.minInstance = minInstance;
        mFields.maxInstance = maxInstance;
Connect your IDE to all the code out there  Get Codota for Java