5

I've been researching about this question a lot. I asked a related question this week.The most helpful and relevant links in the area are this and this. I want to understand how it works and all, if implemented as home screen replacement app.

Quick questions:

  • If implemented which screen should be set as default? Our home screen replacement or original home screen?

  • Please read the comments after the answer of this question where asker figured out a way to do it. In the end he says:

    "Figured it out! Gotta disable the manifest intent filter by using setComponentEnabledSetting(), and then turn it back on when the activity pops up. Thanks for your help!"

What exactly does this mean? I don't quite understand the logic here. Please help?

  • Basically, I have same doubts as this asker (please see the comments below the answer by @CoffeeCrisp). But, I am unable to understand the solution and what exactly happened in here. Please help?
VLAZ
  • 26,331
  • 9
  • 49
  • 67
Dev Dreamer
  • 289
  • 1
  • 9
  • 18
  • Sanket, can you please clarify question again. I am unclear about your problem. – Dev Dreamer May 29 '13 at 07:54
  • i implement my custom lock screen as home replacement app and then in unlock logic(Swipe to dismiss lock screen) disable activity alias(CATEGORY_HOME) to get default home screen without popup for app. And enable that activity alias in broadcast receiver(ACTION_SCREEN_OFF) to get custom lock screen whenever i start(SCREEN_ON) device. And i set custome lock screen to defaut as home screen. my issue is that i am getting my custom lock screen only one time and after unlock my custom lock screen,i am not able to get it again when i start(SCREEN_ON) my device plz help me out in this how to fix it – Sanket Kachhela May 29 '13 at 12:14
  • did you try pressing the hardware home button, and then setting your app as default launcher (always) ? This might do the trick. – Dev Dreamer Jun 03 '13 at 07:22
  • @DevDreamer now that it's been quite some time since your last comment, could you give an update on what/how you did after all? – Ricardo Belchior Feb 25 '14 at 15:07

1 Answers1

3
  1. If you implemented a home screen replacement app, your app should be set as the default launcher/home screen.

  2. setComponentEnabledSetting() allows you to override the intent filters in the manifest and essentially disable them. It sounds like he overrode the filter for the launcher intent after the user unlocked so he could get the default home screen to show up.

That being said, I don't recommend writing a lock screen replacement, there are too many issues, it's hacky and insecure. Focus on lock screen widgets.

Luke
  • 1,069
  • 18
  • 28
  • Thanks for help. Quick followups: (1) If my app is the default home, then on pressing "home" hardware button it will try to launch the lock, instead of real home? Right? (2) Also, I think once the launcher/homescreen is set under "use always", then it stays as it is and other homescreens goes off? (unless apps are re-set). In this situation how to get back the original home screen? (3) What if I implement the entire thing as an app and not as a homescreen replacement, do you foresee any issues with that? THANKS SO MUCH!!! – Dev Dreamer Apr 18 '13 at 19:14
  • 1. If you disable the intent filter after the unlock it shouldn't. 3. If you implement it as an app, then pressing the home button would allow the user to bypass it. If you haven't yet, go download a ton of the lock screen apps from the market and look at what they're doing, pretty much all of them are home screen replacements, including Facebook Home. – Luke Apr 18 '13 at 19:34