Getting exception when trying to set the status of GTalk using XMPPClient
<p>I want to change the status of my gtalk using my application. For that i am using smack API and XMPPClient. But I am getting exception at the time of set the connection. Here is my code:</p>

<pre><code>try
    {
        ConnectionConfiguration conn = new ConnectionConfiguration("talk.google.com",Integer.parseInt("5222"),"gmail.com");
        Log.d("Debug", "configuration object has been created");
        conn.setSASLAuthenticationEnabled(true);
        conn.setDebuggerEnabled(true);
        m_xmppConnection = new XMPPConnection(conn);
        m_xmppConnection.connect();
        Log.d("Debug", "try to connect using XMPPConnection");
        m_xmppConnection.login("yyy", "xxx");
        Presence presence = new Presence(Presence.Type.available);
        presence.setStatus("Setting the status Programmatically");
        presence.setPriority(24);
        presence.setMode(Presence.Mode.available);
        m_xmppConnection.sendPacket(presence);

    }

    catch(XMPPException e)
    {
        e.printStackTrace();
    }
</code></pre>

<p>I am using Android 2.2 and added the smack 3.2.1 jar file. It is giving No response from server. </p>

<p>This is the error in logcat.</p>

<pre><code>     11-15 18:40:28.301: W/System.err(7865): Connection failed. No response from server.: 
11-15 18:40:28.311: W/System.err(7865):     at org.jivesoftware.smack.PacketReader.startup(PacketReader.java:120)
11-15 18:40:28.311: W/System.err(7865):     at org.jivesoftware.smack.XMPPConnection.initConnection(XMPPConnection.java:606)
11-15 18:40:28.320: W/System.err(7865):     at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:565)
11-15 18:40:28.320: W/System.err(7865):     at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:991)
11-15 18:40:28.320: W/System.err(7865):     at com.innominds.ui.Notification.setStatusGtalk(Notification.java:519)
11-15 18:40:28.320: W/System.err(7865):     at com.innominds.ui.Notification.onClick(Notification.java:238)
11-15 18:40:28.320: W/System.err(7865):     at android.view.View.performClick(View.java:2408)
11-15 18:40:28.320: W/System.err(7865):     at android.view.View$PerformClick.run(View.java:8816)
11-15 18:40:28.320: W/System.err(7865):     at android.os.Handler.handleCallback(Handler.java:587)
11-15 18:40:28.343: W/System.err(7865):     at android.os.Handler.dispatchMessage(Handler.java:92)
11-15 18:40:28.343: W/System.err(7865):     at android.os.Looper.loop(Looper.java:123)
11-15 18:40:28.343: W/System.err(7865):     at android.app.ActivityThread.main(ActivityThread.java:4627)
11-15 18:40:28.343: W/System.err(7865):     at java.lang.reflect.Method.invokeNative(Native Method)
11-15 18:40:28.343: W/System.err(7865):     at java.lang.reflect.Method.invoke(Method.java:521)
11-15 18:40:28.343: W/System.err(7865):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-15 18:40:28.351: W/System.err(7865):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-15 18:40:28.351: W/System.err(7865):     at dalvik.system.NativeStart.main(Native Method)
</code></pre>

<p>Why i am getting this can anyone please tell or help??</p>
