Native Android apps, without the installation. 1. What is Android Instant Apps? As a Developer ever thought to bring users into your apps more quickly and easily. Android Instant Apps allows Android users to run your apps instantly, without installation. Android users experience what they love about apps — fast and beautiful user interfaces, high performance, and great capabilities — with just a tap. 2. Why you need to make Android Instant Apps? You can let user try few feature of your native app without installing and they can download installable version when they want.So this brings more customers to your app. 3. How to make Android Instant Apps? :Android Instant Apps only work on Android devices running on Android 6.0 (API level 23) or higher Note Android Instant Apps enables native Android applications to run in response to launching a URL, without installing the app. Instant apps can use many Android APIs and you use Android Studio to build them. Development environment for Android Instant Apps JDK 1.8 Android Studio version 3.0 or later Android SDK 6.0+ Android SDK Build Tools 26.x or later Android SDK Tools 25.x or later Android SDK Platform Tools 25.x or later . Instant Apps Development SDK Open the Android SDK Manager by clicking . Tools > Android > SDK Manager Click the tab. SDK Tools From the list, select . Instant Apps Development SDK Click . Apply Click . Finish opt-in to Android Instant apps in the Settings app of your device by going to . Note that if you do not opt-in, developer mode does not work on the device. The first time you navigate to a instant app, the system automatically asks you to opt-in. Google > Instant Apps With Android Instant Apps, users can use a single feature of an app without having to install the app with all its other features. Each feature within the instant app should have at least one Activity that acts as the for that feature. you need to break up your app into smaller modules and refactor them into . entry-point feature modules Every instant app must have one (and only one) . You can have feature APKs in addition to your APK ,If your Instant app has more features. base feature APK base feature When users request a feature from an instant app, they get two feature APKs: the corresponding feature APK and the base feature APK. If the same user requests another feature from the same instant app, they might receive just the feature APK because they have already downloaded the base feature APK. Of course, if the instant app only has one feature — and thus only a base feature APK — users only receive the base feature APK. source: developer.android.com To download a feature of an instant app from Play, users need only to click a link. After Google Play finds an instant app that matches the link requested by the user, Google Play sends the corresponding feature APKs for that feature to the user’s device and the Android system then launches the feature. If Google Play cannot find a match, it alerts the Android system. The system then broadcasts an intent to the system to handle the URL. Google For this reason, each entry-point activity in an instant app needs to be : it needs to correspond to a unique URL address. To provide a unique URL address for each feature, the instant app specifies a different path underneath the domain for each feature. addressable Ex: Feature “News” : http://example.com/new s Feature “Horoscope” : http://example.com/ horoscope Suppose your app show news by particular city in this case your URL matches _Ex:_All news : Bangalore News : http://example.com/news http://example.com/news/bangalore. The URL address for the CityNews activity is similar to the AllNews activity except that the CityNews activity has a city appended to the URL. The manifest for the feature needs to specify both a path for each activity and a priority order for the activities, in case of multiple matches. 1.Activity Name :AllNewsActivity , url address : ,priority:12. Activity Name :CityNewsActivity , url address : /bangalore , priority:100 http://example.com/news http://example.com/news If Google Play received a request for the URL ‘http://example.com/ /abab', it matches both the AllNews and the CityNews activity. Google Play needs to pick one of the two activities as the starting point for the feature. Because the instant app specifies that the CityNews activity has a higher priority than the AllNews activity, Google Play specifies to the system to start the feature from the CityNews activity news So your manifest will be like <application><activity android:name=".AllNewsActivity"><intent-filter android:order="1"><action android:name="android.intent.action.VIEW" /><category android:name="android.intent.category.BROWSABLE" /><category android:name="android.intent.category.DEFAULT" /><data android:host=" "android:path="/"android:scheme="https" /></intent-filter><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter></activity></application> example.com/new s Here, “android:order” is priority.For creating Instant app in Android studio, Start a new project 2. In the list, select . Minimum SDK API 23: Android 6.0 (Marshmallow) source: developer.android.com 3. Under the list, check . Minimum SDK Include Android Instant app support 4. Select an Activity. source: developer.android.com 5. In the window, do the following: Configure Activity In the box, enter ‘myfirstinstantapp.example.com’. Instant App URL Host In the route box, enter ‘/hello’. Instant App URL 6.Finish and Run. For more details about creating feature module you can see . Google codelabs When you run your app locally on a device or emulator, the Android system displays the default placeholder icon for your app. Once you have deployed your Instant App APK to the Google Play Console, the appropriate icon shows up when the instant app launches. Note: Android Instant Apps uses the runtime permission model introduced in Android 6.0 (API level 23).Instant apps can use the Android permissions shown in the list that follows. Any permission not shown in the list is not available to instant apps. BILLING ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION ACCESS_NETWORK_STATE CAMERA INSTANT_APP_FOREGROUND_SERVICE only in Android O. INTERNET READ_PHONE_NUMBERS only in Android O. RECORD_AUDIO VIBRATE : All traffic from inside the instant app must use HTTPS. Instant Apps does not support HTTP. Note 1 network : The sum of the base feature and the feature APK must be under 4MB. Note 2 : Since App Links are regular URLs, apps can force them to be opened inside an in-app browser. Consider using to wrap your URLs and guarantee that clicks on your links always take users to your instant app. Note 3 Firebase Dynamic Links You can follow sample code provided by google This sample app demonstrates how to build an installed app and an instant app with the same behaviors. Hello World sample app Get it on GitHub This sample app builds upon the Hello World sample app by moving its code into two feature modules. These modules can be run independently. Hello multi feature module sample app Get it on GitHub _Multi feature module sample app_This sample app demonstrates how to build an installed app and an instant app with the same behaviors. The functionality of the instant app is split in two features that you can launch individually on a device. Get it on GitHub _Build flavors sample app_This sample app demonstrates how to build an installed app and an instant app with the same behaviors. The functionality of the instant app is split in two features that you can launch individually on a device.This sample also uses the concept of build flavors, providing both a “paid” and “free” version of the app. Get it on GitHub _Google Analytics for Firebase sample app_This sample app demonstrates how to build an installed app and an instant app with the same behaviors. The app integrates Google Analytics for Firebase event logging into both the installed and instant app, demonstrating how to differentiate events raised in the two versions of the app. Get it on GitHub If you liked my story please click on clap icon and if you want to read future stories by me related to Android Development please follow me.