BlackBerry - read custom ringtone name from address book contact list?

血红的双手。 提交于 2019-12-24 08:20:07

问题


Actually I am assigning custom ringtone with contact number in a custom database contact list. Now I am having problem with the reading to that contact list. If anyone having any idea about this problem pls pls help.

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();
    }
}

回答1:


There is no reference to Contact Custom Ringtone in RIM API documentation...

This is not exposed in the Contact or BlackBerryContact class. There is no API to access the ring tone for a contact.
Mark Sohm
BlackBerry Development Advisor
www.BlackBerryDeveloper.com

BlackBerry Support Community Forums:Java Development:Re: Custom ringtone field in Contacts



来源:https://stackoverflow.com/questions/1896552/blackberry-read-custom-ringtone-name-from-address-book-contact-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!