我实际上正在制作一个移动应用程序,我会设置链接以在您单击它时打开它。我试图设置应用程序链接,但我似乎没有工作......这是我的代码:
清单.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.didierurban.testLenny">
...
<activity
android:name="MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="portrait">
...
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https" android:host="example.net" />
</intent-filter>
</activity>
</application>
</manifest>
我的assetlink.json(在https://example.net/.well-known/assetlinks.json上)
// 20210407190840
// https://lenny-girardot.fr/.well-known/assetlinks.json
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "com.didierurban.testLenny",
"sha256_cert_fingerprints": [
"D4:DC:31:60:E9:B2:3F:2B:DF:23:33:31:49:D3:10:9F:3C:3A:6F:E6:1D:41:6E:DB:17:A3:3E:DD:1C:9C:6A:46"
]
}
}
]
应用程序.json
{
"expo": {
"scheme": "...",
"name": "...",
"slug": "...",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "..."
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "..."
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
如果应用程序链接无法与 React 一起使用,我可以设置什么使其正常工作?我也尝试使用https://www.npmjs.com/package/node-deeplink但它似乎已经过时了。
谢谢