Account Attributes

hi,

Using the latest build, I am able to add and retrive Attribute names to an account. However, I could not locate corresponding API call to retrieve attribute values against each attribute name. Is there a work-around to this problem?

Regards,

Kiran

Kiran,

I’'m not sure I understand what you are doing.

What are you doing in order to add and retrieve attribute names? Are you referring to the registration attributes?

– Gato

hi Gato,

My application has a server component and a client component. Server component creates Jabber IDs using the following method.

void createUserAccount(String jabberID, String password, String name, String emailID)

{

AccountManager accountManager = xmppConnection.getAccountManager();

Map map = new HashMap();

map.put(“name”, name);

map.put(“email”, emailID);

accountManager.createAccount(jabberID, password, map);

}

The client component, after login using the jabber ID and password, should also display the user name and email ID.

.getAccountAttributes() returns only the attribute names.

Regards,

Kiran

Hey Kiran,

Unfortunately AccountManager does not provide a message in order to retrieve the values of the account attributes. AccountManager.getAccountAttributes() just returns the names of the required account attributes (like its comment says).

We could add a new method to AccountManager in order to get the value of a given account attribute but for the moment you can try getting a Registration and use Registration.getAttributes to gain access to the values of the account attributes.

Regards,

– Gato

FYI, in the next daily build you will find a new AccountManager message that allows you to obtain the value of a given account attribute. The message signature is String getAccountAttribute(String).

Regards,

– Gato