How to extend RosterEntry (db) with custom attribute that is NOT RELATED TO PRESENCE

Hi, I need to create android application that will have extended Roster with custom attributes like this:

username,

presence (online/offline),

customAttribute (playing football - custom status that the user sets) …

How to get/set these information from RosterEntries saved in openfire db within Android Smack 4.1 client.

Roster roster = Roster.getInstanceFor(xmpptcpConnection);
for (RosterEntry entry : roster.getEntries()) {
  String username = entry.getUser().toString();
  String status = roster.getPresence(entry.getUser()).getStatus();
  String customAttribute = entry.getCustomAttribute() // <===== I WANT TO BE ABLE TO DO THIS   rosterList.add(entry.getUser() + ": " + status);
}

If that is not possible, what would you suggest to do?

  1. Roster roster = Roster.getInstanceFor(xmpptcpConnection);
  2. for (RosterEntry entry : roster.getEntries()) {
  3. String username = entry.getUser().toString();
  4. Presence presence = roster.getPresence(entry.getUser());
  5. String customAttribute = presence.getExtension(“myExtension”, “http://my.namespace.url.org”).getCustomAttribute()
  6. rosterList.add(entry.getUser() + ": " + presence.getStatus());
  7. }

Will the attribute still be shown in the roster if the user goes offline, or changes his presence in general?

Could you also tell me where openfire saves these attributes in db and how to get/set it?