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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:10:23+00:00 2026-05-31T09:10:23+00:00

I am making a chat window there are two method one for sending message

  • 0

I am making a chat window there are two method one for sending message and one for receiving message.I want when i click on send button the method call and send message to server and a background thread create if there is any response message then add that message to the list.how can i do this?

I want if there is any response message then response message call a thread that check if there is any message receive then add this to listview if not then add nothing to the list.

can anyone help me?

  • 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-31T09:10:24+00:00Added an answer on May 31, 2026 at 9:10 am
    //onCreate
    new BackGroundLoginTask().execute();
    
    
    //async task
    
    public class performBackgroundTask extends AsyncTask < Void, Void, Void >  
        {
          private ProgressDialog Dialog = new ProgressDialog(PlacesList.this);
    
          protected void onPreExecute() 
          {
    
                 Dialog.setMessage("Downloading");
                 Dialog.show();
          }
    
          protected Void doInBackground(Void... params) 
          {
             // write here the code to download  or to perform any background task.
    
    
             //perform background task
                return null;
        }
    
          protected void onPostExecute(Void unused) 
          {
    
              listview.setAdapter(new PlacesAdapter());
              Dialog.dismiss();  
    
          }
    
        }   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a chat window, i just want that message and date time
I am making a browser chat window in Javascript. I want to execute the
I'm making a chat responder for a game and i want know if there
Im making a chat in rails. How do you call each line item? In
I'm making a chat similar to the Facebook's or Gmail's one, but something is
I am making a chat application with PHP and AJAX and I want to
I'm making simple php chat, and i need to refresh messages in one div.I
I'm making simple XMPP client using Jabber-Net. To send simple message i'm using a
Is there any best port for chat programs? I'm making chat and I don't
I'm making web-chat and I want to show last added messages at the bottom

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.