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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:24:48+00:00 2026-06-08T04:24:48+00:00

So i built an app that functions as a lock screen replacement. I use

  • 0

So i built an app that functions as a lock screen replacement. I use a broadcast receiver and a service to start my activity after Intent.ACTION_SCREEN_OFF. So that every time the user locks the screen my activity starts, then when they press the unlock button my activity is already running over the lock screen. But this only works if the user tries to wake up/unlock the phone after a short amount of time. If they wait too long the activity has vanished. I’m not sure why this is happening and what I can do to keep the activity there no matter how long the user waits to try to unlock their phone.

I thought about and tried listening for Intent.ACTION_SCREEN_ON but then there is a delay between the time when the user presses the power button on their phone to wake it up and when the app loads and shows up on the screen. During this gap the user can see the android OS

  • 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-08T04:24:49+00:00Added an answer on June 8, 2026 at 4:24 am

    What if you use a wakelock. For example:

    @Override
    public void onCreate(Bundle savedInstanceState) { 
        PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
        PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "My Tag");
        wl.acquire();
        // do your things, even when screen is off
    }
    
    
    @Override
    protected void onDestroy() {
        wl.release();
    }
    

    You must also have a wakelock permission is AndroidManifest.xml

    uses-permission android:name="android.permission.WAKE_LOCK"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a web app that uses Rails built-in helper functions to add
I've built an app that sends an JSON array via POST on a HTTP
I have built an app that stores dates entered by the user in an
I have built an app that plays lots of sounds the easy way: AudioServicesPlaySystemSound(someSoundID);
I have built an app that works only when not run as a Windows
I have an iPhone app that I've built for the app store. Before I
I built my qt app so that all the Qt modules it uses are
I have an app that uses the built-in flip animation to switch between the
I have an iphone app that I built based off a tutorial (for a
I've built a C# .NET app that uses the Adobe ActiveX control to display

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.