views:

319

answers:

1

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

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

Max Gontar
Thanks for reply
RockOn
You're welcome!
Max Gontar