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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:48:54+00:00 2026-06-02T20:48:54+00:00

My application relies on the intent ACTION_USER_PRESENT being fired, and so I set up

  • 0

My application relies on the intent ACTION_USER_PRESENT being fired, and so I set up a receiver in the manifest and I have a class that starts a service when it receives the intent.

However, when a user is using a lock-screen replacement app like WidgetLocker, the ACTION_USER_PRESENT intent may never be sent, or can be sent a bunch of times. (Once it was sent 5 times…) WidgetLocker’s website explains that the application does send its own intent for unlocking, com.teslacoilsw.widgetlocker.intent.UNLOCKED. In certain configurations of WidgetLocker, ACTION_USER_PRESENT may be fired before the user even unlocks the screen, so I was told that it would be best to set up a check for com.teslacoilsw.widgetlocker.intent.LOCKED, and then wait to receive the UNLOCKED intent and do my work.

My problem is that I’m not sure how to set up a receiver for a third party intent. I’ve added the actions to my receiver in the manifest just find, and I know that my broadcast receiver picks them up, but I need to filter them out. Mainly, if I pick up the LOCKED intent, I want to ignore any ACTION_USER_PRESENT intents, and instead wait for the UNLOCKED intent, but I don’t know how to wait for an intent upon receiving a different one.

  • 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-02T20:48:55+00:00Added an answer on June 2, 2026 at 8:48 pm

    Mainly, if I pick up the LOCKED intent, I want to ignore any ACTION_USER_PRESENT intents, and instead wait for the UNLOCKED intent, but I don’t know how to wait for an intent upon receiving a different one.

    Step #1: Create separate BroadcastReceivers for the WidgetLocker actions vs. ACTION_USER_PRESENT.

    Step #2: Upon receipt of LOCKED, use PackageManager and setComponentEnabledSetting() to disable your ACTION_USER_PRESENT receiver.

    Step #3: Upon receipt of UNLOCKED, use PackageManager and setComponentEnabledSetting() to re-enable your ACTION_USER_PRESENT receiver.

    This could get a bit dicey in edge cases (e.g., user pops out the battery while LOCKED), but it’s a starting point.

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

Sidebar

Related Questions

I have a WinForms application that relies on a class library DLL. Inside the
I have an ASP.NET application that relies on the Random class to generate a
We have an existing application that relies heavily on stored procedures and untyped DataSets.
I have a web application that relies on a MySQL database, for which I
We have an application that relies on some pretty interesting and complex MS SQL
I have an application that relies heavily on charting and currently the charts will
I have a Scala application that relies on an external RESTful webservice for some
I have a python application that relies on a file that is downloaded by
I have a wxPython application that relies on an external config file. I want
I have a PHP application that relies on session variables quite a lot. After

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.