Basically I am connecting native android module with react native and passing information from native to js.
try {
WritableMap params = new WritableNativeMap();
params.putInt("connectionStatus", 2);
sendEvent(mreactContext, "bleConnectionStatus", params);
promise.resolve(params);
} catch (Exception exe) {
Log.d(TAG, "Exception--: " + exe);
promise.reject(exe);
}
It is showing exception
Exception--: com.facebook.react.bridge.ObjectAlreadyConsumedException: Map already consumed
Note : I have already gone through this answer ObjectAlreadyConsumedException: Receiving map already consumed but it seems it was about ordering a line. I have written code in that order only still shows exception.