Pass Data from React Native to Android or iOS native

Does jitsi-meet have any interface or event for passing data from react-native to android or iOS when the app is unmounted? for instance, I want to pass a flag to android when the app unmounted and then do something in android based on that flag. :thinking:

It doesn’t currently send an event on that case. It does, however, send one when a conference is left, which is usually equivalent for the typical SDK user. What is your usecase?

I want to send data when dispatching disconnect() method and get data in android side.
for example:

if (navigator.product === ‘ReactNative’)
      this.props.dispatch(appNavigate(undefined));
} else {
      sendDataToSDK(my_data);
      this.props.dispatch(disconnect(true));
}

Is there any method like sendDataToSDK()?

The call to disconnect will ultimately send conferenceTerminated to the SDK. Why do you need an extra event which represents the same state?

We don’t have a sendDataToSDK per se, bue we do have something very similar in mobile/external-api. That’s what translates JS events into SDK delegate methods.

Hi again. As I told you before, my app consist of some activity and one of them is for jitsi meet. Jitsi meet activity first get some data from user and then starts conference.
Previously I pass required data by setFeatureFlags method and I had some problems. Now I’ve changed the logic and run a local server on android side and get require data in react native by sending get request to the localhost.
But I guess the problem is not related to setFeatureFlag method. When I get data from local server, I save them in the redux state. Once the activity is started for the first time, jitsi meet works well and conference is started with correct data. Then I close the jitsi meet activity. Now when I want to start new activity with new data, the conference doesn’t start with new data although I get new data from android server.
I guess the problem is redux. I mean redux storage still is running unless closing the app. Is it true? Is there any way to terminate all react-native related stuff by closing the activity?

I found the problem. It doesn’t related redux or react native or other things. In some components I defined some global variable(out of the class scope) and those variables declared once when the app is lunched for the first time. When the conference is terminated and another jitsi activity is started, those variables doesn’t reset.