其實我正在自定義數據庫聯繫人列表中分配自定義鈴聲和聯繫人號碼。 現在,我在閱讀該聯繫人列表時遇到問題。 如果有人對這個問題有任何想法請幫助。BlackBerry - 從通訊簿聯繫人列表中讀取自定義鈴聲名稱?
UPDATE
public void showAddressBook() {
try {
ContactList contactList = (ContactList) PIM.getInstance()
.openPIMList(PIM.CONTACT_LIST, PIM.READ_WRITE);
Enumeration enumx = contactList.items();
while (enumx.hasMoreElements()) {
Contact c = (Contact) enumx.nextElement();
int[] fieldIds = c.getFields();
System.out.println("SHOW:" + c.EXTENDED_FIELD_MIN_VALUE);
int id;
for (int index = 0; index < fieldIds.length; ++index) {
id = fieldIds[index];
System.out.println(c.getPIMList().getFieldLabel(id)
+ "==showAddressBook==" + fieldIds.length);
if (c.getPIMList().getFieldDataType(id) == Contact.STRING) {
for (int j = 0; j < c.countValues(id); ++j) {
String value = c.getString(id, j);
System.out.println(c.getPIMList().getFieldLabel(id)
+ "=" + value);
}
}
}
}
} catch (PIMException ex) {
ex.printStackTrace();
}
}
什麼是自定義數據庫聯繫人列表?如何將自定義鈴聲分配給聯繫人?你可以發佈代碼嗎? – 2009-12-13 15:47:51
好吧不要討論關於自定義數據庫! 其實我試圖從黑莓默認地址簿中獲取CustomPhoneTone。我的主要目標是在編輯聯繫人列表和個性化個人音調期間獲取我已分配給聯繫人編號的自定義鈴聲字段。 下面的代碼亙古不給我添加了自定義音場: 公共無效showAddressBook(){ 嘗試{ ContactList contactList =(ContactList)PIM.getInstance()openPIMList( PIM.CONTACT_LIST,PIM.READ_WRITE);枚舉enumx = contactList.items(); 繼續... – 2009-12-14 14:50:39
while(enumx.hasMoreElements()) { Contact c =(Contact)enumx.nextElement(); int [] fieldIds = c.getFields(); System.out.println(「SHOW:」+ c.EXTENDED_FIELD_MIN_VALUE); int id; for(int index = 0; index
2009-12-14 14:51:17