emekalites / react-native-alarm-notification

schedule alarm and local notification in react-native
https://www.npmjs.com/package/react-native-alarm-notification
MIT License
225 stars 95 forks source link

Navigate to a screen using device event emitter #91

Closed PhuocHoangMinhNguyen closed 3 years ago

PhuocHoangMinhNguyen commented 4 years ago

Issue: I am trying to navigate to another screen after triggering DeviceEventEmitter.addListener('OnNotificationOpened') but it doesn't work.

Version: React-Native Version: 0.63.3 React-Native-Alarm-Notification: 1.4.6

Code: DeviceEventEmitter.addListener('OnNotificationOpened', async function (e) { const obj = JSON.parse(e); this.props.navigation.navigate('Screen Two', obj) });

Error: TypeError: undefined is not an object (evaluating 'this.props')

emekalites commented 4 years ago

please try this with the new v1.7.1

stale[bot] commented 3 years ago

Hola! So here's the deal, between open source and my day job and life and what not, I have a lot to manage, so I use a GitHub bot to automate a few things here and there. This particular GitHub bot is going to mark this as stale because it has not had recent activity for a while. It will be closed if no further activity occurs in a few days. Do not take this personally--seriously--this is a completely automated action. If this is a mistake, just make a comment, DM me, send a carrier pidgeon, or a smoke signal.

stale[bot] commented 3 years ago

Closed due to inactivity. Holler if this is a mistake, and we'll re-open it.