zetavg / react-native-system-notification

Android system notifications for React Native. Supports push notifications with GCM integrated.
https://www.npmjs.com/package/react-native-system-notification
244 stars 102 forks source link

Ensure the App is ready in a more reasonable way when the notification is clicked #2

Closed zetavg closed 8 years ago

zetavg commented 8 years ago

Because event handling is done by JS, we'll need to wait for React Native to be fully loaded before sending the click event.

Currently I use SystemClock.sleep(3000);, waiting for 3 seconds to for this, but there must be a more effective way to do this.

https://github.com/Neson/react-native-system-notification/blob/94ccaed7bc1c6edc7db0d251760c92c93cba5461/android/src/main/java/io/neson/react-native/notification/NotificationEventReceiver.java#L43