بهترین شیوه ها را دانلود کنید
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این بهترین شیوهها میتوانند تأخیر نصب را هنگامی که Play as you Download برای برنامه شما فعال است، بهبود بخشند.
از جدیدترین SDK ها استفاده کنید
از جدیدترین SDK ها برای برنامه خود استفاده کنید، به خصوص اگر از SDK های زیر استفاده می کنید:
جدیدترین SDKها برای Play as you Download بهینه شده اند تا بدون اسکن کل باینری برنامه کار کنند. این به کاربران امکان میدهد برنامه شما را در اولین باری که راهاندازی میکنند سریعتر راهاندازی کنند.
از بستههای دارایی زمان نصب استفاده کنید
از بستههای دارایی زمان نصب برای ذخیره داراییهای بزرگ بازی استفاده کنید. Google Play با تجزیه و تحلیل الگوهای استفاده بستههای دارایی زمان نصب، دانلودها را بهینه میکند. این کمک میکند تا بازی بسیار سریعتر راهاندازی شود، در حالی که فقط دادههایی را دانلود میکند که کاربران در طول راهاندازی اولیه بازی به آن نیاز دارند.
جدول زیر نشان میدهد که وقتی بازیها از بسته نرمافزار Android App Bundle با Play Assets Delivery استفاده میکنند، Play چه کد و منابعی را بهینه میکند.
فرمت منبع | بهینه شده توسط Play as you download | توسط Play as you download بهینه نشده است |
---|
فایل های Android App Bundle | ویژگیهای پویا ماژول پایه و زمان نصب (به جز فهرستهای «res/» و «values/») | دایرکتوری های "res/" و "values/" ماژول های پایه و ویژگی های پویا زمان نصب |
| ویژگی های پویا بر اساس تقاضا |
پخش فایل های Asset Delivery | بسته های دارایی زمان نصب | بستههای دارایی را سریع دنبال کنید |
| بسته های دارایی درخواستی |
دارایی های از پیش بارگذاری شده را محدود کنید
به جای اینکه همه دارایی های برنامه را به طور همزمان بارگیری کنید، فقط مواردی را که برای تجربه کاربری فعلی نیاز است، مانند منو یا سطح، بارگیری کنید. بارگیری دارایی های بیش از حد در طول تجربه اولیه از داده های شبکه بیشتری استفاده می کند.
در اینجا چند توصیه اضافی برای بازی های یونیتی وجود دارد:
رفع ANR
با رفع خطاهای ANR (خطاهای عدم پاسخگویی برنامه) در برنامه خود، می توانید تجربه Play as you download برنامه را نیز بهبود ببخشید. به عنوان مثال، با حذف عملیات IO از رشته اصلی ، می توانید ANR ها را در زمانی که Play در حال دانلود دارایی های برنامه در پس زمینه است، به حداقل برسانید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و 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,["# Play as you Download best practices\n\nThese best practices can improve install latency when Play as you Download\nis enabled for your app.\n\nUse the latest SDKs\n-------------------\n\nUse the latest SDKs for your app, especially if you are using the following\nSDKs:\n\n- Facebook Core SDK: 11.2.0 or higher\n\n- FB Audience Network (ads): 6.5.1 or higher\n\nThe latest SDKs are optimized for Play as you Download to operate without\nscanning the entire app binary. This lets users start your app more quickly\nthe first time they launch.\n\nUse install-time asset packs\n----------------------------\n\nUse [install-time](/guide/playcore/asset-delivery#delivery-modes) asset packs to\nstore large game assets. Google Play optimizes downloads by analyzing use\npatterns of install-time asset packs. This helps the game launch much faster\nwhile only downloading data that users need during the initial game launch.\n\nThe following table shows what code and resources are optimized by Play as you\ndownload when games use an\n[Android App Bundle with Play Assets Delivery](/guide/app-bundle/app-bundle-format).\n\n| Resource format | Optimized by Play as you Download | Not optimized by Play as you Download |\n|---------------------------|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|\n| Android App Bundle files | Base Module and install-time dynamic features (except 'res/' and 'values/' directories) | \\`res/\\` and \\`values/\\` directories of base module and install-time dynamic features |\n| Android App Bundle files | | On-demand dynamic features |\n| Play Asset Delivery files | Install-time asset packs | Fast-follow asset packs |\n| Play Asset Delivery files | | On-demand asset packs |\n\nLimit preloaded assets\n----------------------\n\nInstead of preloading all app assets at once, only load what's needed for the\ncurrent user experience such as the menu or level. Loading too many assets\nduring the initial experience uses more network data up front.\n\nHere are some additional recommendations for Unity games:\n\n- See\n [Loading resources at runtime](https://docs.unity3d.com/2022.2/Documentation/Manual/LoadingResourcesatRuntime.html).\n\n- Split large scenes into multiple scenes to avoid loading large amounts of\n asset data at once.\n\n- Use an asset loading profiler (such as the\n [Asset Loading Profiler module in\n Unity](https://docs.unity3d.com/2022.2/Documentation/Manual/profiler-asset-loading-module.html))\n to identify asset loading optimizations for your game.\n\nFix ANRs\n--------\n\nBy fixing [ANRs](/topic/performance/vitals/anr)\n(Application Not Responding errors) in your app, you can also improve the Play\nas you Download experience of the app. For example, by removing\n[IO operations from the main thread](https://developer.android.com/topic/performance/vitals/anr#io_on_the_main_thread),\nyou can minimize ANRs from occurring while Play is downloading app assets in\nbackground."]]