NativeScript URL处理程序插件无法正常工作
我正在尝试将此插件与Nativescript结合使用。 我遵循了教程 在我的app.component.ts中:NativeScript URL处理程序插件无法正常工作,nativescript,nativescript-angular,deeplink,Nativescript,Nativescript Angular,Deeplink,我正在尝试将此插件与Nativescript结合使用。 我遵循了教程 在我的app.component.ts中: ngOnInit() { handleOpenURL((appURL: AppURL) => { console.log('Got the following appURL', appURL); alert(appURL); }); } 在android清单中: <activity android:name=".activ
ngOnInit() {
handleOpenURL((appURL: AppURL) => {
console.log('Got the following appURL', appURL);
alert(appURL);
});
}
在android清单中:
<activity
android:name=".activities.Activity"
android:label="@string/app_name">
<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="http"
android:host="example.com"
android:pathPrefix="/"/>
</intent-filter>
或,
它不起作用。如果有任何帮助,我将不胜感激。我认为点击Chrome地址栏上的URL不会打开你的应用程序。它应该是一个链接,当你点击链接时,它会试图打开你的应用程序
例如,即使是YouTube——如果你点击YouTube.com,它仍然会在Chrome浏览器中打开。如果你点击的Youtube视频链接可能来自谷歌搜索,那么它会尝试启动该应用程序
也不要忘记尝试一个干净的版本。我不认为点击Chrome地址栏上的URL会打开你的应用程序。它应该是一个链接,当你点击链接时,它会试图打开你的应用程序。例如,即使是youtube——如果你点击youtube.com,它仍然会在Chrome浏览器中打开。如果你点击的Youtube视频链接可能来自谷歌搜索,那么它将尝试启动该应用程序。也不要忘记尝试干净的构建。你是对的@Manoj great thank you!:-)