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?
If you implemented a home screen replacement app, your app should be set as the default launcher/home screen.
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.