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?