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
DeviceEventEmitter.addListener is not working in Release build for Android. #43651
Labels
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Needs: Triage 🔍
Newer Patch Available
Platform: Android
Android applications.
Comments
github-actions
bot
added
Newer Patch Available
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
labels
Mar 26, 2024
|
|
Please provide a repro |
@cortinico I have updated the issue and added the native side code too Code on React native side:
Android side code:
|
github-actions
bot
added
Needs: Attention
Issues where the author has responded to feedback.
and removed
Needs: Author Feedback
labels
Mar 27, 2024
@nehab5889 can you use the linked template provided here: |
When i try to use setState inside DeviceEventEmitter.addListener, its crashing the app (Maximum depth exceeded) in react native 0.72.10 |
cortinico
added
Needs: Author Feedback
and removed
Needs: Attention
Issues where the author has responded to feedback.
labels
Apr 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Needs: Triage 🔍
Newer Patch Available
Platform: Android
Android applications.
Description
When app is launched from quit state DeviceEventEmitter.addListener is not working in Release build for Android. It is working perfectly fine in Debug build. I have tried using both the methods:
const eventEmitter = new NativeEventEmitter(NativeModules.RNEventEmitter);
eventEmitter.addListener('EventReminder', event => {
console.log(event);
}
OR
DeviceEventEmitter.addListener('EventReminder', event => {
console.log(event);
}
Android Side Code:
Could you please help with resolving this? I need to emit parameters from native android to react native
Steps to reproduce
const eventEmitter = new NativeEventEmitter(
NativeModules.RNEventEmitter,
);
eventEmitter.addListener('EventReminder', event => {
console.log(event);
}
OR
DeviceEventEmitter.addListener('EventReminder', event => {
console.log(event);
}
React Native Version
0.73.5
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: