ajith-ab / react-native-receive-sharing-intent

A React Native plugin that enables React Native apps to receive sharing photos, videos, text, urls or any other file types from another app
MIT License
297 stars 106 forks source link

Returning to previous app #172

Open Idbucks opened 1 year ago

Idbucks commented 1 year ago

Hello,

It's not really a problem with the package but more in the user process and I think it could be useful for some people. When they're done to share something in my app, I want to bring back the user to the previous app. It's really useful for them when you share pictures or videos from the gallery.

For android, I can use react-native-exit-app or just BackHandler. But on iOS the first package with exit everything, and BackHandler will do nothing because it was not designed for iOS.

I'm using @react-navigation/native for navigation.

If by chance someone had the problem and solved it, it would be awsome.

pavelustenko commented 1 year ago

Hi! I was already desperate, but finally I've just solved the problem of second instance for my application. I changed android:launchMode to "singleInstance" for MainActivity also I set android:documentLaunchMode="never" for it. What I've got now: If the app is not launched the file sharing from another application starts it. If the app is launched and in the background mode the file sharing just navigates to the screen where I deal with them.

Hope this helps