深度链接使用react原生博览会?

lnlaulya  于 2023-02-05  发布在  React
关注(0)|答案(4)|浏览(174)

如何使用react原生expo获得深度链接url?我尝试按照Expo文档https://docs.expo.io/versions/latest/guides/linking.html#handling-urls-in-your-app使用scheme,但它不适用于android。
应用程序json =〉
{“博览会”:{“方案”:“myapp”} }谢谢!

amrnrhlw

amrnrhlw1#

如果你点击一个html链接,它的工作原理如下:

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

实际上,在生产环境中(不是在开发环境中),你的用户可以点击互联网上的链接,所以没有问题!
您还需要将其添加到app.json中

{ "expo": { "scheme": "myapp" } }
cyej8jka

cyej8jka2#

事实上,Android有一个众所周知的公开问题,请看:https://github.com/expo/expo/issues/765

c86crjj0

c86crjj03#

{"博览会":{"名称":"斯波顿支付","鼻涕虫":"spotonpay_expo_mobile","软件开发包版本":"47.0.0","版本":"1.4.1","用户界面样式":"自动"、"图标":"./源代码/资产/图标/主界面. 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"
  }
}

}}

q3qa4bjr

q3qa4bjr4#

{"博览会":{"名称":"斯波顿支付","鼻涕虫":"spotonpay_expo_mobile","软件开发包版本":"47.0.0","版本":"1.4.1","用户界面样式":"自动"、"图标":"./源代码/资产/图标/主界面. 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"
  }
}

}}
删除/android文件夹和expo
运行"expo prebuild"命令并构建它。

相关问题