Expo and native android app communication issues

I have 2 apps.: 1. An expo app 2. Native Android app.

My use case is that I want the expo app to open the android app, and the android app to send the result back to expo.
I am able to open the android app from the expo app, no issues there.
But when I try to communicate the result from android to expo, the expo app restarts. When I build an APK from the expo app everything works fine and the expo app receives the result from android.

How do I solve this? A lot of development time is wasted in building an APK from expo and checking if things work fine.

Can you provide some more detail on how you’re opening one app from another? From both directions

One thing you could do is detach and build the expo app yourself – that might save some time.

I think the Expo app may be restarting bc your device is running low on memory when the Android app starts and so it kills the Expo app.

If you didn’t see this already, here are the docs about linking to your app.

This is how I call native android from expo:

Linking.openURL(url).catch(err =>
        console.error("An error occurred", err)

This is how I send the result back to expo:

Intent intent = new Intent();
String res = "exp://" + image.getAbsolutePath();

Read the section on passing data to your app through the URL here:

You need a + before the data and probably want to use the LinkingUri constant.