Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null is not an object #29

Open
guthriet1230 opened this issue Aug 17, 2022 · 2 comments
Open

null is not an object #29

guthriet1230 opened this issue Aug 17, 2022 · 2 comments

Comments

@guthriet1230
Copy link

guthriet1230 commented Aug 17, 2022

I downloaded the package and pod installed. i reran my metro server and when i navigate to my camera screen, the code is fired and BOOM...

null is not an object (evaluating '_reactNative.NativeModules.KCKeepAwake.activate')

"react-native": "0.69.3",
"react-native-idle-timer": "^2.1.7",

import IdleTimerManager from 'react-native-idle-timer';

within my component
useEffect(()=>{
if(isRecording){
IdleTimerManager.setIdleTimerDisabled(true);
} else{
IdleTimerManager.setIdleTimerDisabled(false);
}
},[isRecording])

@avishka-codimite
Copy link

same issue

TypeError: null is not an object (evaluating '_reactNativeIdleTimer.default.setIdleTimerDisabled')

@bn3t
Copy link

bn3t commented May 18, 2023

Same result here. My setup is tvOS with react-native-tvos@0.71.7-0rc1. I have another native library which works well in my project.

About the install instructions, I think currently it is not necessary to do react-native link anymore. This was for react-native pre 0.60. So I did (cd ios && pod install).

I currently worked around the problem by calling directly setIdleTimerDisabled when the app is activated, but I would like to use this library to have finer grain control.

[application setIdleTimerDisabled:YES];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants