Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7734309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:13:04+00:00 2026-06-01T07:13:04+00:00

I have created a user from openfire admin page. I have entered the username,

  • 0

I have created a user from openfire admin page. I have entered the username, NAME, email, password.

I am writing a client in Android. How can I get the NAME of the current user? I have tried:
(1) connection.getuser() – it returns: peter@www.abc.com/smack
(2) Get self vcard – it returns nothing related to the NAME

I can get the name of other users by RosterEntry.getName(). But how to get the name of current user?

Also, is it possible to get the status of current user? (like presence.getStatus())

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:13:06+00:00Added an answer on June 1, 2026 at 7:13 am

    You can get the name of the current user by using the AccountManager by using the getAccountAttribute and then specify the name of the attribute. In this case it is name”. Here is the code for simply printing the name of the current user

    System.out.println("name = " + connection.getAccountManager().getAccountAttribute("name"));
    

    Regarding your second question you can of course know the other users’ presence in your roster by using roster.getPresence. Here is a simple loop to illustrate the use of this method

     for(RosterEntry r:entries) {
            Presence presence = roster.getPresence(r.getUser());
            System.out.println(presence.toXML());
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created an application which show data from user current location. I want
I have created a Userform that lets the user pick a worksheet from a
I have created a user control tha inherits from the NumericUpDown Control. Is it
Hi I have created a user message page with this plugin. The grid will
I have a project to create a program, which prevents the user from escaping
I have created a user control (CheckedDirTree) that exposes a CheckedFolder property which in
I have created one user named tuser with create database rights in SQL server
I have created an Address user control which is as follow: <%@ Control Language=C#
I have created a COM enabled .NET User Control and am wondering what is
i have created Array of Linkbutton and when user click on link button it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.