3

How to get deep linking url using react native expo? I tried as per Expo documentation https://docs.expo.io/versions/latest/guides/linking.html#handling-urls-in-your-app using scheme but it is not working for android.

app.json =>

{ "expo": { "scheme": "myapp" } } Thanks!

Aishwarya
  • 31
  • 1
  • 1
  • 4

4 Answers4

4

It works if you click on a html link like :

<a href="myapp://">Link to your app</a>

Indeed in the production environnement (not in the dev one) your user click on a link on the Internet. So no problems !

You need also to add this to your app.json

{ "expo": { "scheme": "myapp" } } 
duhaime
  • 25,611
  • 17
  • 169
  • 224
0

In fact, there is a known and open issue with Android. Take a look: https://github.com/expo/expo/issues/765

Bruno Reis
  • 326
  • 2
  • 7
0
{
  "expo": {
    "name": "Spoton Pay",
    "slug": "spotonpay_expo_mobile",
    "sdkVersion": "47.0.0",
    "version": "1.4.1",
    "userInterfaceStyle": "automatic",
    "icon": "./src/assets/icons/mainbtn.png",

    "assetBundlePatterns": ["**/*"],
    "extra": {
      "eas": {
        "projectId": "649e06cd-43b5-4749-b455-7e886a61d9c2"
      }
    },
    "android": {
      "package": "com.codelantic.spotonexpomobile",
      "versionCode": 24,
      "intentFilters": [
        {
          "action": "VIEW",
          "autoVerify": true,
          "data": [
            {
              "scheme": "merchants",
              "host": "qaspoton.monexfintech.com"
            }
          ],
          "category": ["BROWSABLE", "DEFAULT"]
        }
      ],
      "adaptiveIcon": {
        "foregroundImage": "./src/assets/icons/mainbtn.png",
        "backgroundColor": "#fff"
      }
    }
  }
}
Procrastinator
  • 2,526
  • 30
  • 27
  • 36
0

{ "expo": { "name": "Spoton Pay", "slug": "spotonpay_expo_mobile", "sdkVersion": "47.0.0", "version": "1.4.1", "userInterfaceStyle": "automatic", "icon": "./src/assets/icons/mainbtn.png",

"assetBundlePatterns": ["**/*"],
"extra": {
  "eas": {
    "projectId": "649e06cd-43b5-4749-b455-7e886a61d9c2"
  }
},
"android": {
  "package": "com.codelantic.spotonexpomobile",
  "versionCode": 24,
  "intentFilters": [
    {
      "action": "VIEW",
      "autoVerify": true,
      "data": [
        {
          "scheme": "merchants",
          "host": "qaspoton.monexfintech.com"
        }
      ],
      "category": ["BROWSABLE", "DEFAULT"]
    }
  ],
  "adaptiveIcon": {
    "foregroundImage": "./src/assets/icons/mainbtn.png",
    "backgroundColor": "#fff"
  }
}

} }

Delete the /android folder and expo

run "expo prebuild" command and build it.