با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
Google Play Instant به کاربران اجازه میدهد بدون نیاز به نصب APK(ها) در دستگاه خود با برنامه شما تعامل داشته باشند. در عوض، آنها میتوانند برنامه شما را از طریق دکمه «اکنون امتحان کنید» در فروشگاه Google Play یا نشانی اینترنتی که ایجاد میکنید تجربه کنند. این شکل از ارائه محتوا افزایش تعامل با برنامه را برای شما آسان تر می کند.
فقط در صورتی می توانید یک ویژگی را به صورت فوری فعال کنید که ماژول پایه برنامه خود را نیز به صورت فوری فعال کنید. به این دلیل که، اگر کاربری بخواهد یکی از ماژولهای ویژگی فوری برنامه شما را تجربه کند، دستگاه او باید ماژول پایه برنامه شما را نیز برای کدها و منابع رایج دانلود کند. به خاطر داشته باشید، برای پشتیبانی از Google Play Instant، دانلود ماژول و ویژگی پایه شما باید چندین معیار را برآورده کند:
فعالیت پسزمینه: یک ماژول فعال فوری نمیتواند از خدمات پسزمینه استفاده کند. علاوه بر این، چنین ماژولی نمی تواند هنگام اجرا در پس زمینه اعلان ارسال کند .
اگر یک ماژول ویژگی فعال فوری با استفاده از Android Studio 3.5 یا بالاتر ایجاد کنید، همانطور که در این بخش توضیح داده شد، IDE به طور خودکار هر دو ماژول پایه و ویژگی را با درج موارد زیر در مانیفست هر ماژول برای شما فعال می کند:
علاوه بر این، هنگام دانلود و نصب برنامه، ماژول های ویژگی فعال فوری به طور خودکار با APK پایه برنامه شما دانلود و نصب می شوند. بنابراین، IDE همچنین شامل موارد زیر در ماژول ویژگی فعال فوری است.
این رفتار به این معنی است که وقتی dist:instant="true" را تنظیم می کنید، نمی توانید <dist:on-demand /> را نیز وارد کنید. با این حال، میتوانید ماژولهای فعال فوری را در صورت تقاضا در تجربه فوری خودبا استفاده از کتابخانه تحویل ویژگی Play درخواست کنید.
یک ماژول جدید برای تحویل فوری پیکربندی کنید
برای افزودن یک ماژول ویژگی فعال فوری به پروژه برنامه خود با استفاده از Android Studio، به صورت زیر عمل کنید:
اگر قبلاً این کار را نکرده اید، پروژه برنامه خود را در IDE باز کنید.
File > New > New Module را از نوار منو انتخاب کنید.
در گفتگوی Create New Module ، Instant Dynamic Feature Module را انتخاب کرده و روی Next کلیک کنید.
در بخش پیکربندی ماژول جدید ، موارد زیر را تکمیل کنید:
ماژول برنامه کاربردی پایه را برای پروژه برنامه خود از منوی کشویی انتخاب کنید.
نام ماژول را مشخص کنید. IDE از این نام برای شناسایی ماژول به عنوان یک پروژه فرعی Gradle در فایل تنظیمات Gradle شما استفاده می کند. هنگامی که بسته برنامه خود را می سازید، Gradle از آخرین عنصر نام پروژه فرعی برای تزریق ویژگی <manifest split> در مانیفست ماژول ویژگی استفاده می کند.
نام بسته ماژول را مشخص کنید. به طور پیشفرض، اندروید استودیو نام بستهای را پیشنهاد میکند که نام بسته ریشه ماژول پایه و نام ماژولی را که در مرحله قبل مشخص کردهاید ترکیب میکند.
حداقل سطح API را که می خواهید ماژول از آن پشتیبانی کند، انتخاب کنید. این مقدار باید با ماژول پایه مطابقت داشته باشد.
عنوان ماژول را با حداکثر 50 کاراکتر مشخص کنید. این پلتفرم از این عنوان برای شناسایی ماژول به کاربران استفاده می کند. به همین دلیل، ماژول پایه برنامه شما باید عنوان ماژول را به عنوان منبع رشته ای داشته باشد که می توانید آن را ترجمه کنید. هنگام ایجاد ماژول با استفاده از Android Studio، IDE منبع رشته را به ماژول پایه برای شما اضافه می کند و ورودی زیر را در مانیفست ماژول ویژگی تزریق می کند:
اگر میخواهید این ماژول برای دستگاههای دارای Android 4.4 (سطح API 20) و پایینتر در دسترس باشد و در چند APK گنجانده شود، کادر کنار Fusing را علامت بزنید. Android Studio موارد زیر را در مانیفست ماژول تزریق می کند تا انتخاب شما را منعکس کند.
پس از اتمام ساخت ماژول اندروید استودیو، محتویات آن را خودتان از پنجره Project بررسی کنید ( مشاهده > ابزار ویندوز > پروژه را از نوار منو انتخاب کنید). کد، منابع و سازمان پیشفرض باید مشابه ماژول برنامه استاندارد باشد.
در حالی که در حال توسعه برنامه خود با پشتیبانی از ماژولهای ویژگی هستید، میتوانید با انتخاب Run > Run از نوار منو (یا با کلیک بر روی Run) برنامه خود را مانند حالت عادی روی دستگاه متصل نصب کنید. در نوار ابزار).
اگر پروژه برنامه شما شامل یک یا چند ماژول ویژگی است، میتوانید با تغییر پیکربندی اجرا/اشکالزدایی موجود خود، انتخاب کنید که چه ویژگیهایی در هنگام استقرار برنامهتان شامل شود:
از نوار منو Run > Edit Configurations را انتخاب کنید.
از پانل سمت چپ کادر گفتگوی Run/Debug Configurations ، پیکربندی برنامه Android مورد نظر خود را انتخاب کنید.
در بخش ویژگیهای پویا برای استقرار در برگه عمومی ، کادر کنار هر ماژول ویژگی را که میخواهید هنگام استقرار برنامه خود اضافه کنید علامت بزنید.
روی OK کلیک کنید.
بهطور پیشفرض، Android Studio ماژولهای فعال فوری شما را بهعنوان یک تجربه فوری استفاده نمیکند یا از بستههای برنامه برای استقرار برنامه شما استفاده نمیکند. در عوض، IDE فایلهای APK را در دستگاه شما میسازد و نصب میکند که برای سرعت استقرار بهجای اندازه APK بهینهسازی شدهاند. برای پیکربندی Android Studio برای ساخت و استقرار فایلهای APK و تجربیات فوری از یک بسته برنامه، پیکربندی run/debug خود را تغییر دهید .
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],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)."]]