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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:22:49+00:00 2026-06-18T14:22:49+00:00

I want to retrieve the values about health details from server database depends upon

  • 0

I want to retrieve the values about health details from server database depends upon the Update Interval Time. Suppose if the user set the interval time is 10 minutes, so the values from the server should be retrieve at every 10 minutes. It’s like a quartz in Spring. I tried Timer and TimerTask, but it needs a event to run. But in my case, there is no event. So, how can i achieve it?

  • 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-06-18T14:22:50+00:00Added an answer on June 18, 2026 at 2:22 pm

    Put this on you onCreate() method

    Thread timer = new Thread() {
        public void run () {
            for (;;) {
                // do stuff in a separate thread
                uiCallback.sendEmptyMessage(0);
                try {
                    Thread.sleep(UPDATE_TIME);
                } catch (InterruptedException e) {
    
                    e.printStackTrace();
                }    
            }
        }
    };
    timer.start();
    

    Then in the callback, retrieve your data.

      private Handler uiCallback = new Handler () {
            public void handleMessage (Message msg) {
                //  retrieve the values about health details from server database
             }
        };
    

    Dont forget to reset UPDATE_TIME everytime the user set the interval.

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

Sidebar

Related Questions

I want to retrieve values from SQLite database in my Android application. Here in
I have a HTML table as follows. I want retrieve row values from this
I want to store values and retrieve them from a Java HashMap. This is
I have a question about DataTable . I retrieve a DataTable from the database,
i am using coredata in my application to store and retrieve values.i want to
i want to retrieve certificate information e.g, Issued to, Issued by values of a
I'm currently using a Google Stock API to retrieve information from the internet about
I want to query the values from the different Picklist in Opportunity in dynamics
I have a local database and I want to be able to retrieve and
How would I go about modifying my c# console application to retrieve values or

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.