0

before posting this question I had gone through many stackOverflow links and tried to figure out how we can resolve the issue but none of the solutions worked for me.

I am trying to open the application when user clicks the link from the email. I am able to open the app only when I go to App info -> set as default -> supported web addresses and if we enable the link then only app is launching otherwise it is going to browser and showing 404 error.

But I do not want to do manually like above, can you please suggest if there is any other solution. Below is the Manifestfile code

<activity
                android:name=".ui.SplashActivity"
                android:configChanges="orientation|keyboardHidden|screenSize|locale"
                android:hardwareAccelerated="false"
                android:launchMode="singleTask"
                android:exported="true"
                android:screenOrientation="portrait"
                android:theme="@style/Dsm.Theme.App.Fullscreen">
                <intent-filter>
                    <category android:name="android.intent.category.LAUNCHER" />
    
                    <action android:name="android.intent.action.MAIN" />
                </intent-filter>
                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
    
                    <data
                        android:host="www.example1.com"
                        android:pathPattern="/Service/api/deeplink/click"
                        android:scheme="https" />
                </intent-filter>
                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
    
                    <data
                        android:host="www.example2.com"
                        android:pathPattern="/Service/api/deeplink/click"
                        android:scheme="https" />
                </intent-filter>
                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
    
                    <data
                        android:host="www.example3.com"
                        android:pathPattern="/Service/api/deeplink/click"
                        android:scheme="https" />
                </intent-filter>
                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
    
                    <data
                        android:host="www.example0.com"
                        android:pathPattern="/Service/api/deeplink/click"
                        android:scheme="https" />
                </intent-filter>
                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
    
                    <data
                        android:host="www.example4.com"
                        android:pathPattern="/Service/api/deeplink/click"
                        android:scheme="https" />
                </intent-filter>
                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
    
                    <data
                        android:host="www.example5.com"
                        android:pathPattern="/Service/api/deeplink/click"
                        android:scheme="https" />
                </intent-filter>
                <intent-filter android:autoVerify="true">
                    <action android:name="android.intent.action.VIEW" />
    
                    <category android:name="android.intent.category.DEFAULT" />
                    <category android:name="android.intent.category.BROWSABLE" />
    
                    <data
                        android:host="www.example6.com"
                        android:pathPattern="/Service/api/deeplink/click"
                        android:scheme="https" />
                </intent-filter>
            </activity> 

I am trying to use www.example6.com and below is my assetslink.json file changes.

[{
          "relation": ["delegate_permission/common.handle_all_urls"],
          "target": {
            "namespace": "android_app",
            "package_name": "my package name",
            "sha256_cert_fingerprints":
            ["my SHA key"]
          }
        }]
James Z
  • 12,209
  • 10
  • 24
  • 44

0 Answers0