Commit afe2777
committed
Fix Bridge Reload Issue
• When react-native apps get reloaded, the existing bridge is destroyed and a new bridge is created.
• Our SDK was not properly registering the new bridge to receive onReceived and onOpened events for notifications
• Changes the 'registeredEvents' boolean to be an instance variable instead of a static variable.
• Also adds code to remove event listeners when the bridge gets destroyed.1 parent 76299d1 commit afe2777
File tree
1 file changed
+3
-2
lines changed- android/src/main/java/com/geektime/rnonesignalandroid
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
| 438 | + | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| |||
0 commit comments