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 9291675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:42:16+00:00 2026-06-18T20:42:16+00:00

i am using below code to send friend request to any user its working

  • 0

i am using below code to send friend request to any user its working fine but i am not able to find the connected user from roster list.

Now i want to know how could i identify new requested friend in roster list.

Roster roster = XMPPSmackConnection.getInstance().connection.getRoster();
roster.setSubscriptionMode(Roster.SubscriptionMode.manual);
try {
    if(!_userName.contains("@"))
        _userName=_userName+"@204.93.197.136";

    Presence response = new Presence(Presence.Type.subscribe);
    response.setTo(_userName);
    XMPPSmackConnection.getInstance().connection.sendPacket(response);

    //roster.createEntry(_userName, _nickName, my_friends[]);
    //addBuddy(_userName, _nickName, Friends);
} catch (Exception e) {
    _progDailog.dismiss();
    e.printStackTrace();
}
  • 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-18T20:42:17+00:00Added an answer on June 18, 2026 at 8:42 pm

    I have been trying to resolve a similar issue where the Roster List does not updated on accepting a friend’s request.
    Steps followed :-

    1. Sent a friend request using Presence type as subscribe
    2. At the other end, while accepting the friend’s request, a subscribed presence type is sent
    3. On receiving the subscribed Presence packet, another subscribed packet is sent back.

    The server’s roster list gets updated immediately by Subscription type as Both but the roster entries are not.
    Also, the roster’s subscription Mode is set to manual and it also has a PacketListener attached to it.

    Please can you provide some help by contributing your solution to this problem? It would be of great help.

    Thanks and Regards,
    Vaidehi

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am able to send mail using below my code ,but by default after
I am using below code to show jquery dialog, its working perfectly, Sub OpenDialog(ByVal
I'm using the below code in my app delegate to send the user to
Using the code below to send. The gen_tcp:send call returns {error,einval} but I can't
I'm trying to send a string via ftp using the code below but I'm
I'm using the code below to authenticate a user in Active Directory, but the
I'm using the script below to send emails, unfortunately, it's not working on my
I am using below code to send email it works fine most of the
am using system.net.mail to send email as shown below, but its too slow. it
I am using the below code to send the mail Intent i = new

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.