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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:44:23+00:00 2026-06-16T01:44:23+00:00

I programmed an App for Android and got some trouble with my Service. The

  • 0

I programmed an App for Android and got some trouble with my Service.
The following image may gives a better understanding of the situation. I tried to keep it as simple as possible:

Visualisation of the problem

I have an Activity that starts a service. This service starts a Thread which does a request to a Web page. As soon as this service is started, it should continue this procedure.
The only Exception is the low memory killer or human request from the activity.

My Problem now: In the moment where the Android-device activates its powersafe-mode (Screen turns black), the Thread is paused/halted. After i reactivate the device, the Thread resumes.

What I got so far:

  • Using the emulator, all works fine (sending request even in power safe mode)
  • Android-device connected to PC/Laptop (with and without debug mode), all works like it’s supposed to be
  • Android device not connected to anything –> as soon as it goes to power safe mode, the Thread is pausing
  • reactivating the device, the Thread continues (e.g. not destroyed of the low memory killer)

I hope you got an understanding of my problem and can help me. I can’t see the reason why it won’t work in the one special given situation.

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-06-16T01:44:24+00:00Added an answer on June 16, 2026 at 1:44 am

    Have a look to the PowerManagement class. But use it carefully because :

    Device battery life will be significantly affected by the use of this API. Do not acquire PowerManager.WakeLocks unless you really need them, use the minimum levels possible, and be sure to release them as soon as possible.

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

Sidebar

Related Questions

being a Java/Linux advocate, and having programmed my first Android app a while ago,
Recently I programmed a little app for my android device. As the datastorage for
I have programmed a simple hibernate app which isn't updating the table. The following
I have programmed a simple hibernate app which leaves me with errors. The following
I am developing an Android App that gets some data from a web server,
I have programmed a simple app for testing some things. One thing is AdMob.
I'm trying to programme an Android app that will update some TextViews as I
As a an inexperienced Android programmer I need some help. I'm designing this app
I programmed an quiz-app and if I touch one of the answers in an
I've written an Android app which various abstract classes that perform useful functions. These

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.