How to make my expo app appear in the share list of another app?
Asked Answered
N

4

9

This question has been asked many times on stack overflow, but never for apps generated using the expo framework, which makes my app specific and incompatible with replies from other posts.

How can I make my expo app appear in the share list of another app? It seems the docs don't address this topic.

Share menu

Nonanonage answered 23/12, 2019 at 18:10 Comment(0)
I
4

You can't.

At least not in the expo managed workflow at the time I'm writing this. If that's crucial for your app, you can eject, move to the bare workflow and give react-native-share-extension a shot.

PS: There's a feature request. I hope they'll implement it in the (near) future.

Isodimorphism answered 13/4, 2020 at 21:55 Comment(3)
Did you find solution for Expo?Garate
So sad it's still not supportedCoracoid
We did it in our expo app using share intent demo library npmjs.com/package/expo-share-intentLiquidate
S
0

Using the configuration in app.json and specifically the android.intentFilters key,

      "intentFilters": [
        {
          "action": "SEND",
          "data": [
            {
              "mimeType": "text/plain"
            }
          ],
          "category": ["DEFAULT"]
        }
      ]

(more here https://docs.expo.dev/versions/v48.0.0/config/app/#intentfilters)

I have managed to make my app appear in the share list. However, I don't know and can't find how to get the data sent from the other app.

Any help about how to handle the received data in react?

Specialism answered 26/6, 2023 at 11:51 Comment(1)
I found it, using Philip's answer here expo.canny.io/feature-requests/p/… !Specialism
L
0

We had tried to do it for a couple of days, There is only one solution that we found that really works

https://www.npmjs.com/package/expo-share-intent

You even don't need to work in a bare workflow, however you need to run dev build it's not working with ExpoGo

Liquidate answered 2/4 at 23:41 Comment(0)
M
0

You can!

Use the expo-share-intent library with Expo to enable sharing URLs, text, images, videos, and files in your iOS and Android apps.

This library provides a simple native module for Expo to handle sharing functions.

enter image description here

Microcopy answered 2/9 at 8:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.