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

  • Home
  • SEARCH
  • 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 5961249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:56:19+00:00 2026-05-22T18:56:19+00:00

i am implementing one chat messages related application in this main activity call one

  • 0

i am implementing one chat messages related application in this main activity call one method and second method every ten seconds refreshing this method applied ui handler refreshing purpose both running at same time my intension is one method call some time and refresh applied second method call some time initally activity first time only how can implement time delay in both methods

first method :

Handler handlerTimer = new Handler();

handlerTimer.postDelayed(new Runnable()
{
public void run()
{
handlerMessage("",0);

}}, 2000);

second method:

 class RefreshHandler extends Handler 
     {
        public void handleMessage(Message msg)
         {
            Main.this.updateUI();
         }
         public void sleep(long delayMillis) {
            this.removeMessages(0);
            if(isUpdateUI  )

          sendMessageDelayed(obtainMessage(0), delayMillis);
         }
         };
         private void updateUI()
              {
                handlerreferesh("",0);//this second method 

        }

        mRedrawHandler.sleep(10000);
         }
         }

first method initially call 2 sec after second refresh call some time how can implemented plaese forawrd some valuable suggestion 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-22T18:56:20+00:00Added an answer on May 22, 2026 at 6:56 pm

    Use one thread with one handler for the first method and another thread with another handler for second method.

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

Sidebar

Related Questions

i am implementing one game application in this application i am using shared preferences
i am implementing one application related to android in adobe flex, .apk is generated
which one is better for implementing chat for the iPhone with users in the
I'm trying to learn about trees by implementing one from scratch. In this case
I am implementing one application gust i am adding validations in login page implemented
I am implementing one application some fields are edittext in edittext clicking open mobile
I am implementing one iphone application in which i want to find direction of
We are implementing one web based application in iPhone. if i answered the incoming
What are some options for implementing a chat feature in a C#/WPF desktop application?
I'm implementing a chat application. The user is able to have multiple chats open

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.