简体   繁体   中英

Deeplinking not working via intents android

I am generating this share url

http://domain.be/app_name/users/shareItem/MTY1

I want to create deep linking so I am using following code. If the app is not installed it should redirect to Google Play store otherwise it will open the app. However opening this browser does nothing.

On app side i am using this code

<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>

On server side I am doing this

  $this->redirect("intent://domain.be/app_name/users/shareItem/#Intent;scheme=http;package=com.domain.app_name;end");

I have chrome only on simulator and when i run the above Url , it does nothing.

If you want to open Play Store if app is not installed then you should use deep linking by Branch.Io

It is very good in deep linking and easy to use.

I have used deep linking by Intent but it is not redirecting me to the play store if app not installed.

Try this hope it helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM