[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Configure instant delivery\n\n[Google Play Instant](/topic/google-play-instant/overview) allows users to\ninteract with your app without needing to install\nAPK(s) on their device. Instead, they can experience your app through the\n\"Try Now\" button on the Google Play Store\nor a URL that you create. This form of delivering content makes it easier\nfor you to increase engagement with your app.\n\nYou can instant-enable a feature only if you also instant-enable your\napp's base module. That's because, if a user wants to experience one of your\napp's instant-enabled feature modules, their device must also download your\napp's base module for common code and resources. Keep in mind, to support Google\nPlay Instant, the download for your base module and feature must satisfy\nseveral criteria:\n\n- **Maximum size:** The combined size of your instant-enabled base module and your instant-enabled feature module must be at most 10 MB. To learn more, read [Enable instant experiences by reducing app or game\n size](/topic/google-play-instant/overview#reduce-size).\n- **Background activity:** An instant-enabled module cannot use [background\n services](/training/run-background-service/create-service). Additionally, such a module cannot [send notifications](/training/notify-user/build-notification) when running in the background.\n\nIf you create an instant-enabled feature module using [Android Studio\n3.5](/studio) or higher, as described in this section, the IDE automatically\ninstant-enables both the base and feature module for you by including\nthe following in each module's manifest: \n\n \u003cmanifest xmlns:dist=\"http://schemas.android.com/apk/distribution\"\n ... \u003e\n \u003cdist:module dist:instant=\"true\" /\u003e\n ...\n\nAdditionally, when downloading and *installing* your app,\ninstant-enabled feature modules are automatically downloaded and installed with\nyour app's base APK. So, the IDE also includes the following in the\ninstant-enabled feature module. \n\n \u003cdist:module ...\u003e\n \u003cdist:delivery\u003e\n \u003cdist:install-time /\u003e\n \u003c/dist:delivery\u003e\n \u003c/dist:module\u003e\n\nThis behavior means that when you set `dist:instant=\"true\"`, you cannot also\ninclude `\u003cdist:on-demand /\u003e`. However, you can request instant-enabled modules on\ndemand *within your instant experience*\n[using the Play Feature Delivery Library](/guide/playcore#java-kotlin-asset-delivery).\n\n### Configure a new module for instant delivery\n\nTo add an instant-enabled feature module to your app project using\nAndroid Studio, proceed as follows:\n\n1. If you haven't already done so, open your app project in the IDE.\n2. Select **File \\\u003e New \\\u003e New Module** from the menu bar.\n3. In the **Create New Module** dialog, select **Instant Dynamic Feature Module** and click **Next**.\n4. In the **Configure your new module** section, complete the\n following:\n\n 1. Select the **Base application module** for your app project from the dropdown menu.\n 2. Specify a **Module name** . The IDE uses this name to identify the module as a Gradle subproject in your [Gradle settings file](/studio/build#settings-file). When you build your app bundle, Gradle uses the last element of the subproject name to inject the `\u003cmanifest split\u003e` attribute in the [feature module's manifest](#dynamic_feature_manifest).\n 3. Specify the module's **package name**. By default, Android Studio suggests a package name that combines the root package name of the base module and the module name you specified in the previous step.\n 4. Select the **Minimum API level** you want the module to support. This value should match that of the base module.\n 5. Specify the **Module title** using up to 50 characters. The platform\n uses this title to identify the module to users. For this\n reason, your app's base module must include the module title as a\n [string resource](/guide/topics/resources/string-resource), which you\n can translate. When creating the module using Android Studio, the IDE\n adds the string resource to the base module for you and injects the\n following entry in the feature module's manifest:\n\n \u003cdist:module\n ...\n dist:title=\"@string/feature_title\"\u003e\n \u003c/dist:module\u003e\n\n | **Note:** If you enable resource shrinking, such as for your release builds, the shrinker may remove the module title string resource if code in your base module does not reference it. To make sure the string resource remains in the build output, include the resource in a [custom resource keep file](/studio/build/shrink-code#keep-resources).\n 6. Check the box next to **Fusing** if you want this module to be available\n to devices running Android 4.4 (API level 20) and lower and included in\n multi-APKs. Android Studio injects the following in the module's manifest\n to reflect your choice.\n\n \u003cdist:module\u003e\n \u003cdist:fusing dist:include=\"true\" /\u003e\n \u003c/dist:module\u003e\n\n5. Click **Finish**.\n\nAfter Android Studio finishes creating your module, inspect its contents\nyourself from the **Project** pane (select **View \\\u003e Tool Windows \\\u003e Project**\nfrom the menu bar). The default code, resources, and organization should be\nsimilar to those of the standard app module.\n\nAfter you implement a feature that you want to download on demand, learn how to\nrequest it [using the Play Feature Delivery Library](/guide/playcore#java-kotlin-asset-delivery).\n\nDeploy your app\n---------------\n\nWhile you're developing your app with support for feature modules, you can\ndeploy your app to a connected device like you normally would by selecting\n**Run \\\u003e Run** from the menu bar (or by clicking **Run** in\nthe toolbar).\n\nIf your app project includes one or more feature modules, you can\nchoose which features to include when deploying your app by modifying\nyour existing [run/debug configuration](/studio/run/rundebugconfig) as\nfollows:\n\n1. Select **Run \\\u003e Edit Configurations** from the menu bar.\n2. From the left panel of the **Run/Debug Configurations** dialog, select your desired **Android App** configuration.\n3. Under **Dynamic features to deploy** in the **General** tab, check the box next to each feature module you want to include when deploying your app.\n4. Click **OK**.\n\nBy default, Android Studio doesn't deploy your instant-enabled modules as an\ninstant experience or use app bundles to deploy your app. Instead, the IDE\nbuilds and installs APKs to your device that are optimized for deployment speed,\nrather than APK size. To configure Android Studio to instead build and deploy\nAPKs and instant experiences from an app bundle, [modify your run/debug\nconfiguration](/studio/run/rundebugconfig#android-application)."]]