edyim
edyim

Reputation: 145

Disable Keyguard and show activity when the system boots

Consider:

KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.disableKeyguard();

I have done the above code to disable the keyguard of my lockscreen activity and it works when normal trigger or SMS service triggers it when the screen is off.

I have set it to be started onboot of the Android. However, the keyguard appears and I have to unlock it before I see my own lockscreen. How can I solve this?

Upvotes: 0

Views: 2154

Answers (1)

android developer
android developer

Reputation: 116010

It makes sense, since there are some other processes to run on boot before all other applications.

However, if you wish to have it as one of the first, set it as an app launcher.

You might want to pass home-button intents to the previous launcher, of course, when it's expected...

Upvotes: 0

Related Questions