evollu / evollu/react-native-fcm
FCM.scheduleLocalNotification not called in killed state
- Dominant language
- Java
- Stars
- 1.7k
- Forks
- 661
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Its is strange that, I am getting remote notifications and `FCM.on(FCMEvent.Notification,(data)=>{})` is getting called in all the three states(foreground,background and killed state) of the app. But in case of `FCM.scheduleLocalNotification({...})`, the event `FCM.on(FCMEvent.Notification,(data)=>{})` is only getting called when in foreground & Background.
As per my debugging, I saw that, when app is in killed state, then `LocalBroadcastManager.getInstance(mContext).sendBroadcast(i)` is returning `false`.
So I guess like remote messages, the react context should be created and the event should be fired. As I have lack of knowledge in ReactApplication) getApplication() and getApplicationContext(), I am inable to fix this. Or may be my way of thinking is wrong.
So please let me know is there any hack I have to do to get the local notification event in killed state of the app ?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.