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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:41:50+00:00 2026-05-31T13:41:50+00:00

I have been writing a chat app for android. I am implementing Google talk

  • 0

I have been writing a chat app for android.

I am implementing Google talk shared status messages feature.
http://code.google.com/apis/talk/jep_extensions/shared_status.html

I have to send this stanza

<iq type='get' to='gmail.com'>
  <query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>

My code (using SMACK api) is:

    final IQ iq = new IQ() {
        public String getChildElementXML() { 
            return "<query xmlns='http://jabber.org/protocol/disco#info'/>"; 
        }
    };

    iq.setTo("gmail.com");
    iq.setType(IQ.Type.GET);

    Log.w("IQ", "Prepared packet " + iq.toXML());
    Log.w("IQ", "Sending 1");
    connection.sendPacket(iq);

I am expecting to receive the following packet:

<iq xmlns='jabber:client' from='gmail.com' type='result'>
  <query xmlns='http://jabber.org/protocol/disco#info'>
    <identity category='server' type='im' name='Google Talk'/>
    <feature var='http://jabber.org/protocol/disco#info'/>
    <feature var='google:jingleinfo'/>
    <feature var='google:roster'/>
    <feature var='google:nosave'/>
    <feature var='google:setting'/>
    <feature var='google:shared-status'/>
    <feature var='http://jabber.org/protocol/archive#otr'/>
    <feature var='google:mail:notify'/>
    <feature var='http://jabber.org/protocol/archive#save'/>
    <feature var='http://jabber.org/protocol/rosterx'/>
  </query>
</iq>

My listener receives the packet:

public void processPacket(Packet    
    //IQ iq = (IQ) packet;
    Log.w("IQ", "Packet received " + packet.toXML());
}

On receiving, I am getting the following log:

03-17 08:05:43.129: W/IQ(1050): Packet received <iq id="fYhYL-4" to="abdurrahim.ceg@gmail.com/androidC2AEBEEF" from="gmail.com" type="result"></iq>

What am I doing wrong?

Thanks in advance!

  • 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-05-31T13:41:51+00:00Added an answer on May 31, 2026 at 1:41 pm

    There was no problem with sending the packets. I has to write an IQProvider or PacketExtensionProvider to parse the incoming packets since smack doesn’t understand these custom packets.

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

Sidebar

Related Questions

I'm writing a chat feature (like the Faceboook.com one) for a Google App Engine
I have been writing unit tests using NUnit and Moq with my Silverlight code
I have been writing Python code for only a couple of weeks, so I'm
I have been writing some code that creates a generic blog. Its features are
I have been writing a growing code base in Haskell. My problem is that
I have been writing some C# code for a training exercise, in which I
I have been writing same code for insert, update, delete with LINQ over and
I have been writing code without realizing WHY I can access constant values within
I have been writing this Android application for the past few days and everything
I have been writing C code for many years, but I recently came accross

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.