I need to lock the android device while the user clicks a button. I searched the stackoverflow and read the same questions, but I didn't find any code that works on all versions of android .do you know any way that works on any version of android? (1.6+)
UPDATE: I want to bring up the lock screen of the user's device, I mean I myself don't want to make a lock screen, just want to show the default lock screen of the user. I tried this and this but neither of them worked...