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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:24:47+00:00 2026-06-07T17:24:47+00:00

I am creating an app which needs to listen to a (hardware) keypress during

  • 0

I am creating an app which needs to listen to a (hardware) keypress during a long time period so, I thought that if I lock the screen during that period the phone would save a lot of battery. But some months ago I read something about androids lockscreen.. It was said that during lockscreen, the phone would not be able to listen to hardware keypresses… Am I right?

After this explanation, my question is: Does anyone know any way of listening to a keypress with locked screen in order to not drain a lot of battery?

I thought something about putting screen brightness to its lowest value, but Cpu will be draining battery, because phone is not in deep sleep, so I think this is not the correct way 🙂

any other way, please???

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-07T17:24:50+00:00Added an answer on June 7, 2026 at 5:24 pm

    you will have to start an infinitely running service to achieve what you are trying to do.
    I would like to suggest you a more efficient way to do this, which is making use of ACTION_SCREEN_OFF instead. Good Luck.

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

Sidebar

Related Questions

I am creating an app which needs to be opened if a user double
i am creating an app that needs a database. i created it using sqlite
I'm creating an app that needs three separate search boxes. I want them to
In my app I am creating a broadcast receiver which will listen for network
I am creating a appwidget which needs to update when some changing in app's
I'm creating an app that needs to be accessed by both a web front
I'm creating an SL4 app that needs to query certain data via a webservice
I am creating an app that needs a database. I created it using sqlite
I am creating an app which needs sign-in. On the desktop (full) website, he
I'm creating an application that needs to use some kernel level modules, for which

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.