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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:24:15+00:00 2026-05-27T19:24:15+00:00

I am trying to change the Gtalk Status using XMPPConnection in Android. But when

  • 0

I am trying to change the Gtalk Status using XMPPConnection in Android. But when i am trying through Wi-Fi it is unable to connect. It is giving pop-up showing Application is not responding. My Code is here:

                    ConnectionConfiguration conn = new ConnectionConfiguration("talk.google.com",Integer.parseInt("5222"),"gmail.com");
                m_xmppConnection = new XMPPConnection(conn);
                conn.setSASLAuthenticationEnabled(false);
                conn.setDebuggerEnabled(true);
                SASLAuthentication.supportSASLMechanism("PLAIN", 0);

                try 
                {
                    m_xmppConnection.connect();
                } 
                catch (XMPPException e1) 
                {
                    displayAlertDialog(e1.getMessage());
                }

                try
                {
                    Log.d("Testing", "try to connect using XMPPConnection");

                    Log.d("Testing", "try to connect using XMPPConnection-----");
                    if(m_xmppConnection.isConnected())
                    {
                        Log.d("Testing", "It is connected with XMPPConnection");
                        m_xmppConnection.login(strUname, strPwd);
                    }
                    Log.d("Testing", "after giving user name and pwd-----");
                    Presence presence = new Presence(Presence.Type.available);
                    m_strGtPrevMsg = presence.getStatus();
                    m_spEditor.putString("prevmsg", m_strGtPrevMsg);
                    m_spEditor.commit();
                    presence.setStatus(strStatus);
                    Log.d("Testing", "status saved");
                    presence.setPriority(24);
                    presence.setMode(Presence.Mode.available);

                    m_xmppConnection.sendPacket(presence);
                    Log.d("Testing", "packet send");
                }

                catch(XMPPException e)
                {
//                  e.printStackTrace();

                    displayAlertDialog(e.getMessage());
                }

Can anyone help please.

  • 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-27T19:24:16+00:00Added an answer on May 27, 2026 at 7:24 pm

    My guess: You do the connection on the UI thread, right?

    Make an AsnycTask and do your connection and status changes there.

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

Sidebar

Related Questions

Am trying to change my web application using AD for authentication. My application uses
I am trying change the stdout of the system function using select. But it
I'm trying to change a site's home directory using powershell. This is what I
i've been trying to change the background image of the input button through css,
I am trying to change the font size using python's ImageDraw library. You can
I am trying to change the value of upper bound in For loop ,but
Trying to change background/foreground color....Using Gtk+ and C. GdkColor color; gdk_color_parse( #0080FF, &color );
Im trying to change the thread priority in boost but im having no luck.
im trying to change the text of a label from a class but have
Im trying to change the title from the activities inside the Tab. but the

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.