You should have at least one active APK that is mapped to site 'sample.com' via a web 'intent-filter'

后端 未结 4 952
深忆病人
深忆病人 2020-12-19 10:59

Trying to upload instant application but getting this error

You should have at least one active APK that is mapped to site \'sample.com\' via a web \'

相关标签:
4条回答
  • 2020-12-19 11:39

    Your app must also define a default URL for your app. Within the same Android manifest as your entry-point activity, you define the default URL for your app by adding a element with a value attribute that provides a valid HTTPS URL that the activity can handle. Further, this default url must also be part of the CATEGORY_LAUNCHER activity's intent filter in the installed app.

    The following code snippet shows an Android manifest that defines an entry-point activity and default URL for an instant app.

    <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 apps does not support HTTP. Your default-url should be HTTPS

    For more details can you check android AIA documentation.

    There is some inappropriate string for error message, can you ensure fix with, installable APK in alpha, beta or production with same HOST web 'intent-filter'.

    0 讨论(0)
  • 2020-12-19 11:42

    Upload installable APK in alpha, beta or production with same HOST web 'intent-filter'.

    0 讨论(0)
  • 2020-12-19 11:44

    Instant apps does not support HTTP. Your default-url should be HTTPS

    <meta-data
            android:name="default-url"
            android:value="https://sample.com/base-app/salt_one" />
    
    0 讨论(0)
  • 2020-12-19 11:53

    You are defining an Intent filter with the scheme and host:

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

    so you have to access your deep links with

    http://sample.com
    

    but this domain must be a valid domain, and this domain must be of your property because you need to add the assetlinks.json

    The website www.example.com publishes a statement list at https://www.example.com/.well-known/assetlinks.json. This is the official name and location for a statement list on a site; statement lists in any other location, or with any other name, are not valid for this site. In our example, the statement list consists of one statement, granting its Android app the permission to open links on its site:

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

    Read more about it:

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

    0 讨论(0)
提交回复
热议问题