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

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

Open
VishalMathimaran opened this issue Feb 14, 2021 · 0 comments

Comments

@VishalMathimaran
Copy link

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)

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

1 participant