Posts

Showing posts with the label Dynamic module

How to download dynamic module ?

If you don’t know how to create dynamic feature module please visit this link . If you already have your module ready than we will check how to download the module in our application and use it. So let’s start :- First you have to add Android Play Core  library in your project : api "com.google.android.play:core:${versions.playcore}" After that sync project and add below line in your manifest file : <manifest xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:dist="http://schemas.android.com/apk/distribution"     package="com.google.android.samples.dynamicfeatures">     <dist:module dist:instant="true" />   <Application/> </manifest> Once you have done with your manifest file than you have to install splitCompact in your project. So for that you have to add the following code in your project Application class. class AppApplication : SplitCompatApplication(){  ...

How to create dynamic module ?

Dynamic Delivery Feature :  This uses an Android app bundle to generate an android app as per user configurations. This user has the power to download only the part of resources that are used by user so that you can create a smaller and optimised version of your app. So first you have to create a new dynamic module in your project. To create a new dynamic module follow the below steps : 1. Select File > New > New Module from the menu bar. 2. In the Create New Module dialog, select Dynamic Feature Module and click Next . 3. After that, you have to give a Title for your module with a maximum character limit of 50 and select the type of module. The dialog gives you three types of the dynamic delivery feature : 1. Include module at install-time 2. Do not include modules at install-time. 3. Only include module at app install for devices with specified features Pick one as per your needs. In this example, we are using Option 2 and click on Finish. Once your mod...