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 ?
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 ofFCM.scheduleLocalNotification({...})
, the eventFCM.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 returningfalse
.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 ?