[英]Deeplinking not working via intents android
我正在生成此共享网址
http://domain.be/app_name/users/shareItem/MTY1
我想创建深层链接,因此我正在使用以下代码。 如果未安装该应用,则应将其重定向到Google Play商店,否则它将打开该应用。 但是,打开此浏览器没有任何作用。
在应用程序方面,我正在使用此代码
<activity
android:name=".activities.SplashActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data
android:host="domain.be"
android:scheme="http"
android:path="/app_name/users/shareItem"
>
</data>
</intent-filter>
</activity>
在服务器端,我正在这样做
$this->redirect("intent://domain.be/app_name/users/shareItem/#Intent;scheme=http;package=com.domain.app_name;end");
我只在模拟器上安装了chrome,当我运行上述网址时,它什么也没做。
如果您要在未安装应用的情况下打开Play商店,则应使用Branch.Io的深层链接
它在深度链接方面非常好并且易于使用。
我使用了Intent的深层链接,但如果未安装应用程序,则不会将我重定向到Play商店。
尝试此希望对您有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.