簡體   English   中英

深度鏈接無法通過Intent Android工作

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM