Adding data to the database cursor

I may have done wrong, but if so, please correct me. Here is the situation: I have a query that returns URI strings for ringtones stored in a database.

I am trying to add a “column” to this cursor using the “Heading” call (as this may change outside of my program).

I can use it successfully RingtoneManagerto get the header, but I can’t figure out how to add this “column” to the cursor data for later use.

Here is what I still have:

if (cursor != null) {  
    cursor.moveToFirst();  
    do {  
        String ringerTitle =   getRingerTitle(cursor.getString(cursor.getColumnIndex(PoolDbAdapter.KEY_RINGER)));  

        // How can I add ringerTitle to a new column here?

    } while (cursor.moveToNext());   
}
+3
source share
3 answers

Cursor . Cursor , .

, Cursor, , Cursor, . , , SimpleCursorAdapter, CursorAdapter bindView(), .

+4

( , ), , , :

baseCursor

+1

Please take a look at this topic:

Record in the cursor:

0
source

Source: https://habr.com/ru/post/1727975/


All Articles