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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:33:10+00:00 2026-06-10T20:33:10+00:00

I am making an app with a function to start a Timer . However

  • 0

I am making an app with a function to start a Timer. However I am facing a very serious problem.

Now suppose I have stared the timer of 10 minutes using CountDownTimer. After 10 minutes it should give me a beep. Now suppose I have pressed the home button thus making an application go on background. CountDownTimer property is that it continues to countDown, thus after 10 minutes I will get a beep.

However this happens if the screen time is not out. If the screen time is out and the screen goes blank/black then the timer still continues but at its finish, nothing in the application runs like app is on pause and once i click any button on mobile to make the mobile active, the application starts running in the background again..

I want to stop this and want the app to run even the screen time is out too.

How can this be possible.

  • 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-10T20:33:11+00:00Added an answer on June 10, 2026 at 8:33 pm

    You will have to get a partial wakelock to keep the CPU running , so that your timer continues to run. Otherwise the device goes to sleep.

    PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
     PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Countdown");
     wl.acquire();
    

    In finish you can do a release.

     wl.release();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making an app and would like to have a function that links
Hey, so I'm making an iPhone app and in there is a common function
Iam making an app which has one index.php file. I also have these other
So I'm making a app for a bank, but it doesnt manage very important
I'm making some frontend experiments and I'd like to have a very basic webserver
I'm making a function in my android app that, at a home screen the
I'm making an app where users can write reviews on venues and currently have
i'm making app that the main page include TableView but i want when i
I am making app that takes a screenshot of a URL requested by the
I am making app about google documents. but I don't know How to save

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.