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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:42:02+00:00 2026-05-20T05:42:02+00:00

How can I run services in the background of a battery manager Android application?

  • 0

How can I run services in the background of a battery manager Android application?

How would I display or receive a notification when the battery is low or when certain criteria are met?

For example, for an alarm, when the current time equals the alarm time the alarm rings.

  • 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-20T05:42:03+00:00Added an answer on May 20, 2026 at 5:42 am

    You have 3 options:

    1. You create a long running Service. It spawns off a thread that checks the things you mentioned periodically. I wouldn’t advise this tho, these services tend to be killed on the long run by the os. Also, you’d have to use Wake Locks to prevent the system to put the cpu on idle when the phone goes idle after some minutes of inactivity – also stopping you service.

    2. Check out the available system events for which you can register Broadcast Receivers. If you find suitable ones (I think there’s one for indicating low battery levels), write receivers for them.

    3. Use the timing service to register intents to be fired off on regular intervals. These intents would start a service (a short running one) that would do your thing.

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

Sidebar

Related Questions

Can anyone provide some information on how to run an integration services package, on
Can you install and run your own windows services on ec2? Does it have
My ASP.NET application needs a number of supporting services to run periodically in the
I am making a media player ,who can run in background. i have to
I want a service which can run in the background until I stop, even
please tell me that as we have a service in android which can run
How can I set up MongoDB so it can run as a Windows service?
I can run the server on my local machine and connect to it on
I can run commands like vacuumdb, pg_dump, and psql just fine in a script
I can run this command in SqlManager to detach the db ALTER DATABASE mydb

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.