react-native-system-setting icon indicating copy to clipboard operation
react-native-system-setting copied to clipboard

TypeError: undefined is not a function (near '..._reactNativeSystemSetting.default.addlistener...')

Open VishalMathimaran opened this issue 4 years ago • 0 comments

The code is :- this.listener = SystemSetting.addlistener( async (locationEnabled) =>{ if(!locationEnabled && !this.state.locationProcessing){ await this.setState({ locationProcessing:true }); console.log("Location is turned off in between"); await this.getLocationAccess(); this.setState({ locationProcessing:false }); } } ); SystemSetting.removeListener(this.listener);

The error is :- TypeError: undefined is not a function (near '..._reactNativeSystemSetting.default.addlistener...')

This error is located at: in MainScreen (at App.js:31) in App (at renderApplication.js:45) in RCTView (at View.js:34) in View (at AppContainer.js:106) in RCTView (at View.js:34) in View (at AppContainer.js:132) in AppContainer (at renderApplication.js:39)

VishalMathimaran avatar Feb 14 '21 13:02 VishalMathimaran