I send push notif. from Device1 to Device2. Device2 catch this and emit NativeModule custom method "invokeApp" for app invoking. It works perfect, even if app was in killed state.
Device2 open my app, and i trying to emit info data to the Device1, that my app on Device2 was successfully opened.
WritableMap paramsData = Arguments.createMap();
paramsData.putString("eventProperty", "successfully opened");
reactContext
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit("appInvoked", paramsData);
If Device2 was in background state - this works, Device1 catch message about successfully opening. BUT! If Device2 was in killed state (it was killed from list of recently opened applications), it doesn't work(
I catch this event with NativeEventEmitter module of ReactNative
const eventEmitter = new NativeEventEmitter(NativeModules.RNInvokeApp);
eventEmitter.addListener('appInvoked', (event) => {
console.log('event invoked', event);
});
How can I emit information, when the application was in a killed state? Help please. I have been trying to solve this for the second week. Thanks in advance for your future tips.