How to lock iPhone and Android when pushed power button Android/iOS?
Hi there.
If I push power button of iPhone/Android, the device turn off. And What I'd like to do is locking screen.
Is it able without plugin?
Answer by HenryStrattonFW · Nov 05, 2015 at 12:33 PM
When you press the power button? This is already done by the device, pressing the power button on iOS or android will already turn the screen off, if that locks the screen or not is based on the users settings for the device, I do not believe you have (or should have) access to that setting in your game.
Thank you fore replying. I misunderstood.
When I pushed home button, Unity's layer was shown. I hope lock screen layer is in Unity's layer.
Unity's layer and lock screen was appears but lock screen always is priority
Your answer
Follow this Question
Related Questions
Shader question for ios - not working on the device 1 Answer
Can you detect iOS generation or device type from within the Unity environment? 0 Answers
Game does not start up after I allready playtested it on iPad and iPhone 0 Answers
URP: Particle Material with Overlay Color Mode Looks Different on Android and iOS than Editor 2019.4 1 Answer
Image Effects keep on rendering 0 Answers