9

Upload failed

You should use both http and https as schemes for your web intent-filters.

I am getting this error while uploading the instant app to Play Store. I have declared intent filters for both http and https in Manifest as below.

<intent-filter>
                <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"
                    android:host="XXXX" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:scheme="https"
                    android:host="XXXX" />
            </intent-filter>

Could you please let me know what could be wrong and why i am getting this error while uploading to Play Store ?

Prags
  • 2,457
  • 2
  • 21
  • 38
Android Geek
  • 101
  • 1
  • 3

7 Answers7

7

Try to declare IntentFilter like this

<intent-filter>
    <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="yourhost.ru" />
    <data android:pathPattern="/featurePath" />
</intent-filter>
Minas Mina
  • 2,058
  • 3
  • 21
  • 35
mol
  • 2,607
  • 4
  • 21
  • 40
  • I have the same problem of unable to upload instant app, after change the IntentFilter like described then I can upload it successfully, but unfortunately I am having other problem : can not rollout the instant app, please see https://stackoverflow.com/questions/44772959/android-instant-app-is-uploaded-but-can-not-be-roll-out – hmaxf2 Jun 28 '17 at 06:20
  • 1
    I am also facing the same problem while upload the app bundle (.aab) into play store. I have declared the intent filter like you mentioned, but it didn't resolve that issue. What else might be the reason for this issue? – Baskaran Veerabathiran Aug 05 '20 at 08:40
1

Don't change your intent filter code by your own in the Manifest file.

Just go to Tools > App Links Assistants and follow the steps from 1 to 4.

In step 1 itself android studio will automatically add those intent filter codes to your manifest file.

(Source : Developer Documentation > Add Android App Links )

Follow the steps from the link.

Prags
  • 2,457
  • 2
  • 21
  • 38
  • Not true, because the editor even ask you to add either http or https, it won't add both for one link. – htafoya May 26 '22 at 23:37
1

you have to define both in the same intent filter

   <intent-filter>  
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />

        <data
            android:host="XXXX"
            android:scheme="http" />

        <data
            android:scheme="https"
            android:host="XXXX" />
    </intent-filter>
Dart
  • 135
  • 11
1

        <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"
                android:host="XYZ"
                android:pathPattern="/app" />

            <data
                android:scheme="https"
                android:host="XYZ"
                android:pathPattern="/app" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <meta-data
            android:name="default-url"
            android:value="https://XYZ/app" />
    </activity>

Had the same problem. The above manifest solved my problem

Vigneshwaran
  • 161
  • 8
0

Agrees with the previous answer, but also add android:autoVerify="true" into intent-filter

KitKat
  • 31
  • 2
0

I did everything mentioned above but finally get rid of this error after adding these permissions in my base module's manifest.

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
pallav bohara
  • 6,199
  • 6
  • 24
  • 45
0

There are two potential reasons for this issue

#1 You need to check your manifiest.xml and Add both http and https schemes

e.g:

   <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.example.co" />
            <data android:scheme="http" />
            <data android:scheme="https" />
        </intent-filter>

or

      <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.example.com"
                android:scheme="https" />
            <data
                android:host="www.example.com"
                android:scheme="http" />
       </intent-filter>

#2 If you're using deeplinks in your navigation graph you need to include both http and https as well

e.g:

    <deepLink
        app:action="android.intent.action.MY_ACTION"
        app:mimeType="type/subtype"
        app:uri="https://www.example.com/example" />

    <deepLink
        app:action="android.intent.action.MY_ACTION"
        app:mimeType="type/subtype"
        app:uri="http://www.example.co/example" />
Mohamed Nageh
  • 1,963
  • 1
  • 19
  • 27