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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:24:46+00:00 2026-06-10T01:24:46+00:00

I wrote an android service, which search for GPS every 5 minutes. I have

  • 0

I wrote an android service, which search for GPS every 5 minutes. I have used a timer inside the service. But this timer is not running when the phone is in the sleep mode.

Can’t I run a service when the phone is in sleep mode?
How can I over come this problem? pls help me.

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

    Instead of using a Service I would recommend that you take a look at the AlarmManager class. Depending on what you are trying to achieve this could be the better way to go. Using AlarmManager you can schedule a task (piece of code) to be executed at a given point in time. When you set an alarm you can set it’s mode to RTC_WAKEUP which will wake the device up if it’s sleeping and run the code associated with the alarm.

    Take a look here for more details:
    http://developer.android.com/reference/android/app/AlarmManager.html

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

Sidebar

Related Questions

I am writing an Android service which is executed every 15 minutes. It requires
I'm developing an android application which uses background service. I have not had much
I wrote an application about NFC in android,but I have a problem. When I
I wrote a android service which computes list of applications installed on the phone
I have a peculiar problem , i have an android service which starts on
I have an Android service which sends broadcast intents. I'm trying to get those
Using android 2.3.3, I have a background Service which has a socket connection. There's
I wrote an android app for someone, but they want the source code because
I wrote an android app, which requires large amount of data to be transfered
I found couple of difference frameworks which can test Android apps, but all of

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.