You must have at least one active APK that maps to "sample.com" through a web intent filter,

Trying to download an instant application but getting this error

You must have at least one active APK that maps to 'sample.com' via a web intent filter.

<activity
    android:name=".ui.InstantSplash"
    android:screenOrientation="portrait"
    android:theme="@style/splashScreenTheme">

    <meta-data
        android:name="default-url"
        android:value="https://sample.com/base-app/salt_one" />

    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

    <intent-filter
        android:autoVerify="true"
        tools:targetApi="m">
        <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" />
        <data android:host="sample.com" />
        <data android:pathPrefix="/base-app" />
        <data android:scheme="https" />
    </intent-filter>
</activity>
+5
source share
4 answers

Download the installable APK in alpha, beta, or using the same HOST web filter.

+4
source

You define an Intent filter with a schema and host:

<data android:scheme="http" />
<data android:host="sample.com" />

so you need to access your deep links with

http://sample.com

, but this domain must be a valid domain , and this domain must be your property, because you need to addassetlinks.json

- www.example.com https://www.example.com/.well-known/assetlinks.json. ; . , Android- :

[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target" : { "namespace": "android_app", "package_name": "com.example.app",
               "sha256_cert_fingerprints": ["hash_of_app_certificate"] }
}]

:

https://developers.google.com/digital-asset-links/v1/getting-started#quick-usage-example

0

HTTP. URL- HTTPS

<meta-data
        android:name="default-url"
        android:value="https://sample.com/base-app/salt_one" />
0

URL . Android-, , URL- , value, HTTPS URL-, . , URL- CATEGORY_LAUNCHER .

Android, URL .

<activity
  android:name=".MainActivity">
    <intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LAUNCHER" />
    </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:scheme="http" />
      <data android:scheme="https" />
      <data android:host="example.com" />
    </intent-filter>
    <meta-data
      android:name="default-url"
      android:value="https://www.example.com/index.html" />
</activity>

Instant applications do not support HTTP. Your default url should be https

For more information, you can check out the Android AIA documentation .

There is some inappropriate line for reporting an error whether you can provide a fix using the installable APK in alpha, beta, or using the same intent web host filter .

0
source

Source: https://habr.com/ru/post/1691124/


All Articles