也許我正在以這種錯誤的方式進行討論,但如果是這樣,請糾正我。 這是情況:我有一個查詢返回存儲在數據庫中的鈴聲的URI字符串。將數據添加到數據庫光標
我想添加一個「列」與這個光標與振鈴器「標題」(因爲這可以改變我的程序之外)。
我可以成功使用RingtoneManager
來獲得標題,但我無法弄清楚如何將這個「列」添加到遊標數據供以後使用。
這是我到目前爲止有:
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());
}
你的'光標'從哪裏來?你能顯示查詢嗎? – 2010-01-10 20:04:44
遊標來自數據庫查詢並返回與鈴聲相關的URI,例如「content:// media/audio/3」 – Ryan 2010-01-10 20:24:13