Home > database >  How to prevent auto lock phone screen in a specific screen react native
How to prevent auto lock phone screen in a specific screen react native

Time:06-21

I need to avoid phone from auto locking screen in a specific screen in react native. what is the best way to do that.

CodePudding user response:

You can not avoid user locking screen but try using this library https://www.npmjs.com/package/react-native-wake-lock this might help.

CodePudding user response:

This is not possible. Also, can you please explain your use case? Maybe there's a better way to achieve what you are trying to do.

  • Related