简体   繁体   中英

Error in retrieving the name field in symbian using J2ME

I have added the firstname, middlename, lastname, suffix, prefix in symbian and now i want to retrieve each of this attributes of name.

I am getting the firstname and lastname together by

if(contactlist.isSupportedField(Contact.FORMATTED_NAME) && contact.countValues(Contact.FORMATTED_NAME)>0) {
                        mycontact.setName(contact.getString(Contact.FORMATTED_NAME, 0));
                    }

AFAIK, FORMATTED_NAME is just a Contact field like any other.

I don't think the JSR-75 specifications asks for the content of the FORMATTED_NAME field to be created out of the content of the other related fields.

You would need to specifically set some content in the FORMATTED_NAME field before trying to retrieve it with getString().

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM