marcshilling / react-native-idle-timer

A cross-platform bridge that allows you to enable and disable the screen idle timer in your React Native app
MIT License
216 stars 42 forks source link

feat: tag every call to disable the idle timer and expose static method for non react-native usage #31

Closed wood1986 closed 1 year ago

wood1986 commented 1 year ago

expo-keep-awake can tag every call to keep the screen awake and this library does not have capability. Meanwhile, I also expose a static method for non react native code to keep the screen awake in a centralized place

Android implementation from expo https://github.com/expo/expo/blob/main/packages/expo-keep-awake/android/src/main/java/expo/modules/keepawake/ExpoKeepAwakeManager.kt

iOS implementation from expo https://github.com/expo/expo/blob/main/packages/expo-keep-awake/ios/KeepAwakeModule.swift

wood1986 commented 1 year ago

Hey @marcshilling, I hope you can take my change and maintain on your side. Please.

wood1986 commented 1 year ago

Just ping again @marcshilling

marcshilling commented 1 year ago

Hey @wood1986...this looks good. Will try to make some time to merge and publish a new version this week, thanks!

Also, updating the README to describe this new functionality would be helpful!

wood1986 commented 1 year ago

I have updated the README.md. Please review. Thanks

marcshilling commented 1 year ago

@wood1986 merged and published as v2.2.0. Thanks!