androidgoogle-playandroid-instant-appsdynamic-feature-module

Instant app, Try Now button does not appear in play store


i started with following github projects but these example are not working properly. I added missing parts as stated in the docs. https://github.com/android/app-bundle-samples/tree/main/InstantApps/urlless https://github.com/googlecodelabs/android-dynamic-features

Here is the docs i read. https://developer.android.com/topic/google-play-instant/getting-started/instant-enabled-app-bundle https://developer.android.com/topic/google-play-instant/feature-module-migration https://developer.android.com/guide/app-bundle/instant-delivery

i try to implement a simple hello world instant app. I tried many things but try now button never appears in play store.

my app contains 2 module:

build.gradle of app module :

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 30
    defaultConfig {

        minSdkVersion 21
        targetSdkVersion 30
        versionCode 61
        versionName "61"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    dynamicFeatures = [':instantapp']
}

dependencies {
    ...
    implementation "com.google.android.gms:play-services-instantapps:17.0.0"
    implementation "com.google.android.play:core:1.9.0"
    ...
}

build.gradle of my instant-app module

plugins {
    id 'com.android.dynamic-feature'
}
android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        applicationId "com.test.myapp"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 3
        versionName "1.2"
    }
}

dependencies {
    
    implementation "com.google.android.play:core:1.9.0"
   
}

AndroidManifest.xml of my app module

<?xml version="1.0" encoding="utf-8"?>
<manifest >

    <dist:module dist:instant="true" />

    ...

</manifest>

AndroidManifest.xml of my instant-app module

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:dist="http://schemas.android.com/apk/distribution"
    package="com.test.instantapp"
    android:targetSandboxVersion="2">

    <dist:module dist:instant="true" dist:onDemand="false"
        dist:title="Instant app title">
        <dist:fusing dist:include="true" />
    </dist:module>

    <application android:usesCleartextTraffic="false">
        <activity android:name=".InstantMainActivity">
            <intent-filter>
               <action android:name="android.intent.action.MAIN" />
               <category android:name="android.intent.category.LAUNCHER" />
           </intent-filter>
        </activity>
    </application>

  
</manifest>

I generate a signed bundle and upload it in internal test in each of my try but it did not work. i tried it in prod environment too. Not work!

I tried to put applicationId "com.test.myapp" in both app module and instant-app module. I tried to made android:targetSandboxVersion="2" and android:targetSandboxVersion="1". Not work . Version code of my app is greater than version code of my instant-app as shown below.

I removed clearTextTraffic and added. Not work!

Some said me to take my instant app enabled code to take into production and upload a new upgraded instant app version. I did it, it did not work either.

I tried many many combinations which i cannot remember now. But try now button never appears. What is the missing part i cannot find ?

There are 3 different sayings for maximum size of instant-app module:


Solution

  • open play store -> select app-> open advanced settings -> add release type instant app

    enter image description here

    Then upload your instant app from instant apps only option:

    enter image description here