Everyone has randomly downloaded several apps and not deleted them for months, years, or eternity!
I bet You have some of those apps now!
People can now use an app or game without installing it first. Increase engagement with your Android app and gain more installs by surfacing your instant app across the Play Store and Google Play Games app.
Yes, you heard it right, Google play instant now provides us with these features and Android’s new app publishing format, the Android App Bundle, makes it easier than ever to offer a Google Play Instant experience.
Let’s see how to build one –
Followings Points need to be considered before building one –
– Supported permissions and operations
Instant-enabled app bundles can only use permissions from the following list:
ACCESS_COARSE_LOCATION
ACCESS_FINE_LOCATION
ACCESS_NETWORK_STATE
BILLING
– Deprecated as of Play Billing Library 1.0.CAMERA
INSTANT_APP_FOREGROUND_SERVICE
– Only in Android 8.0 (API level 26) and higher.INTERNET
READ_PHONE_NUMBERS
– Only in Android 8.0 (API level 26) and higher.RECORD_AUDIO
VIBRATE
WAKE_LOCK
Handling common unsupported permissions
The following is a list of common, non-supported permissions you must remove from your application and the recommended migration path for each:
ACCESS_WIFI_STATE
BILLING
: This is a deprecated permission. Use the Google Play Billing Library, which no longer requires thecom.android.vending.BILLING
permission.READ/WRITE_EXTERNAL_STORAGE
: Instant apps do not have access to external storage; use internal storage instead.- background services.
- Send notifications when running in the background.
Access to Installed apps
Apps with below flags.
android:visibleToInstantApps
- Intent filter that includes
CATEGORY_BROWSABLE
-
ACTION_SEND
,ACTION_SENDTO
, orACTION_SEND_MULTIPLE
action.
Lets Build . . .
Dependendcies
implementation("com.google.android.gms:play-services-instantapps:17.0.0")
Update the target sandbox version
Your instant app’s AndroidManifest.xml
file needs to be updated to target the sandbox environment that Google Play Instant supports.
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
...
android:targetSandboxVersion="2" ...>
Declare instant-enabled app modules
- Open the Project panel by selecting View > Tool Windows > Project from the menu bar.
- Right-click on your base module, typically named ‘app’, and select Refactor > Enable Instant Apps Support.
- In the dialog that appears, select your base module from the dropdown menu.
- Click OK.
Android Studio adds the following declaration to the module’s manifest:
<manifest ... xmlns:dist="http://schemas.android.com/apk/distribution">
<dist:module dist:instant="true" />
...
</manifest>
Display an install prompt
You may provide an instant experience for your user. once he likes next what within the instance experience you can ask user to install actual app using below code.
class MyInstantExperienceActivity : AppCompatActivity {
// ...
private fun showInstallPrompt() {
val postInstall = Intent(Intent.ACTION_MAIN)
.addCategory(Intent.CATEGORY_DEFAULT)
.setPackage(your-installed-experience-package-name)
// The request code is passed to startActivityForResult().
InstantApps.showInstallPrompt(this@MyInstantExperienceActivity,
postInstall, request-code, /* referrer= */ null)
}
}
Lets Upload . . . .
Build > Build Bundle(s) / APK(s) > Build Bundle(s).
- Requires Signing process
- Valid keystores.
- Version code must be less than uploaded version if app already present
Play store Process

Once this is Enabled, let’s upload our build to internal track

Once Build is uploaded, you should be able to see “Try Now” button and should be able to Try!

I would like to conclude, Every App provider must provide an initial look and feel for app, For better User understanding.
Summary
Instant Apps are the future. The ability to quickly use an app without installing it on your device is a feature too good to fizz out. With the steps mentioned in this article, you should be able to seamlessly offer this nifty feature to your users and greatly enhance your value-offering.