Updated 1 May 2019
Google Play Instant Apps are Play Store apps you can open before requiring installation. If you like the app you can download and purchase it if necessary from the Play Store.
To create an instant app you require Android Studio 3.3 or higher and Google Play Instant Development SDK installed.
Now create a new project and in the process, you will see a checkbox to enable instant apps. Please check the image below.
Now you need to change your application module into a feature module so that it can be available to the instant app and normal app as well. At the end there should be three modules:
Every app that supports Google Play Instant must have one feature module marked as the base feature module to have the features to be used in instant app. It can be enabled in build.gradle file.
1 2 3 4 5 |
android { ... baseFeature true ... } |
Implement the feature module containing the app code in the instant app module. Example below:
1 2 3 |
dependencies { implementation project(':base') //base is feature module } |
Final step is to create a App Link as users don’t install your app when using Google Play Instant, so to open your app, users will usually click on a link. For Google Play Instant, URLs are the entry point into an app and they are associated with Activities. These URLs must be verified App Links. Example of App Link can be viewed in the below image.
Now you may select the instant module and run the instant app on the device.
Few things to remember:
ACCESS_COARSE_LOCATION
ACCESS_FINE_LOCATION
ACCESS_NETWORK_STATE
BILLING
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
References:
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.