i create a lockscreen application and i need to disable a home button, so if that phone is stolen, that phone can\'t be accessed.. my lockscreen is a fullscreen activity.. i
This is the working for the above issue..
@Override
public void onAttachedToWindow() {
this.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
KeyguardManager keyguardManager = (KeyguardManager) getSystemService(KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
lock.disableKeyguard();
}
Add android.permission.DISABLE_KEYGUARD
permission and give android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
to Application