پلتفرم Android 15 شامل تغییرات رفتاری است که ممکن است بر برنامه شما تأثیر بگذارد. تغییرات رفتاری زیر برای همه برنامهها ، بدون توجه به targetSdkVersion
، هنگام اجرا بر روی Android 15 اعمال میشود. شما باید برنامه خود را آزمایش کنید و سپس آن را در صورت لزوم تغییر دهید تا در صورت لزوم از این موارد به درستی پشتیبانی شود.
مطمئن شوید که فهرستی از تغییرات رفتاری که فقط بر برنامههایی که اندروید 15 را هدف قرار میدهند را نیز بررسی کنید.
عملکرد اصلی
اندروید 15 قابلیت های اصلی مختلف سیستم اندروید را اصلاح یا گسترش می دهد.
تغییرات در وضعیت بسته
The intention of the package FLAG_STOPPED
state (which users
can engage in AOSP builds by long-pressing an app icon and selecting "Force
Stop") has always been to keep apps in this state until the user explicitly
removes the app from this state by directly launching the app or indirectly
interacting with the app (through the sharesheet or a widget, selecting the app
as live wallpaper, etc.). In Android 15, we've updated the behavior of the
system to be aligned with this intended behavior. Apps should only be removed
from the stopped state through direct or indirect user action.
To support the intended behavior, in addition to the existing restrictions, the
system also cancels all pending intents when the app enters the
stopped state on a device running Android 15. When the user's actions remove the
app from the stopped state, the ACTION_BOOT_COMPLETED
broadcast is delivered to the app providing an opportunity to re-register any
pending intents.
You can call the new
ApplicationStartInfo.wasForceStopped()
method to confirm whether the app was put into the stopped state.
پشتیبانی از اندازه صفحه 16 کیلوبایت
从历史上看,Android 仅支持 4 KB 内存页面大小,这优化了系统内存性能,以适应 Android 设备通常拥有的平均总内存量。从 Android 15 开始,AOSP 支持配置为使用 16 KB 页面大小的设备(16 KB 设备)。如果您的应用直接或通过 SDK 间接使用任何 NDK 库,则需要重新构建应用,才能在这些 16 KB 设备上运行。
随着设备制造商不断制造出具有更大物理内存 (RAM) 的设备,许多此类设备将采用 16 KB(最终甚至更大)的页面大小来优化设备性能。添加对 16 KB 页面大小设备的支持,可让您的应用在这些设备上运行,并帮助您的应用受益于相关的性能改进。如果不重新编译,应用将无法在未来 Android 版本的 16 KB 设备上运行。
为帮助您为应用添加支持,我们提供了相关指南,介绍了如何检查应用是否受到影响、如何重新构建应用(如果适用),以及如何使用模拟器(包括 Android 模拟器的 Android 15 系统映像)在 16 KB 环境中测试应用。
Benefits and performance gains
دستگاه هایی که با اندازه صفحه 16 کیلوبایت پیکربندی شده اند به طور متوسط کمی از حافظه بیشتری استفاده می کنند، اما بهبودهای عملکردی مختلفی را برای سیستم و برنامه ها نیز به دست می آورند:
- زمانهای راهاندازی برنامه کمتر زمانی که سیستم تحت فشار حافظه است: به طور متوسط 3.16٪ کمتر، با بهبودهای قابل توجه (تا 30٪) برای برخی از برنامههایی که آزمایش کردیم.
- کاهش مصرف انرژی در حین راه اندازی برنامه: به طور متوسط 4.56٪ کاهش
- راهاندازی سریعتر دوربین: به طور متوسط 4.48٪ سریعتر استارتهای گرم و 6.60٪ سریعتر شروع سرد.
- بهبود زمان بوت سیستم: به طور متوسط 8٪ (تقریباً 950 میلی ثانیه) بهبود یافته است.
این پیشرفتها بر اساس آزمایش اولیه ما هستند و نتایج روی دستگاههای واقعی احتمالاً متفاوت خواهد بود. در ادامه آزمایش خود، تجزیه و تحلیل بیشتری از دستاوردهای بالقوه برای برنامه ها ارائه خواهیم کرد.
Check if your app is impacted
如果您的应用使用了任何原生代码,则应重新构建应用,使其支持 16 KB 设备。如果您不确定自己的应用是否使用了原生代码,可以使用 APK 分析器来确定是否存在任何原生代码,然后检查您找到的任何共享库的 ELF 段对齐情况。Android Studio 还提供了一些功能,可帮助您自动检测对齐问题。
如果您的应用仅使用以 Java 或 Kotlin 编程语言编写的代码(包括所有库或 SDK),则该应用已支持 16 KB 设备。不过,我们建议您在 16 KB 环境中测试应用,以验证应用行为是否出现意外的回归。
تغییرات لازم برای برخی از برنامه ها برای پشتیبانی از فضای خصوصی
Private space is a new feature in Android 15 that lets users create a separate space on their device where they can keep sensitive apps away from prying eyes, under an additional layer of authentication. Because apps in the private space have restricted visibility, some types of apps need to take additional steps to be able to see and interact with apps in a user's private space.
All apps
Because apps in the private space are kept in a separate user profile, similar to work profiles, apps shouldn't assume that any installed copies of their app that aren't in the main profile are in the work profile. If your app has logic related to work profile apps that make this assumption, you'll need to adjust this logic.
Medical apps
When a user locks the private space, all apps in the private space are stopped, and those apps can't perform foreground or background activities, including showing notifications. This behavior might critically impact the use and function of medical apps installed in the private space.
The private space setup experience warns users that the private space is not suitable for apps that need to perform critical foreground or background activities, such as showing notifications from medical apps. However, apps can't determine whether or not they're being used in the private space, so they can't show a warning to the user for this case.
For these reasons, if you develop a medical app, review how this feature might impact your app and take appropriate actions—such as informing your users not to install your app in the private space—to avoid disrupting critical app capabilities.
Launcher apps
If you develop a launcher app, you must do the following before apps in the private space will be visible:
- Your app must be assigned as the default launcher app for the device—that
is, possessing the
ROLE_HOME
role. - Your app must declare the
ACCESS_HIDDEN_PROFILES
normal permission in your app's manifest file.
Launcher apps that declare the ACCESS_HIDDEN_PROFILES
permission must handle
the following private space use cases:
- Your app must have a separate launcher container for apps installed in the
private space. Use the
getLauncherUserInfo()
method to determine which type of user profile is being handled. - The user must be able to hide and show the private space container.
- The user must be able to lock and unlock the private space container. Use
the
requestQuietModeEnabled()
method to lock (by passingtrue
) or unlock (by passingfalse
) the private space. While locked, no apps in the private space container should be visible or discoverable through mechanisms such as search. Your app should register a receiver for the
ACTION_PROFILE_AVAILABLE
andACTION_PROFILE_UNAVAILABLE
broadcasts and update the UI in your app when the locked or unlocked state of the private space container changes. Both of these broadcasts includeEXTRA_USER
, which your app can use to refer to the private profile user.You can also use the
isQuietModeEnabled()
method to check whether the private space profile is locked or not.
App store apps
The private space includes an "Install Apps" button that launches an implicit
intent to install apps into the user's private space. In order for your app to
receive this implicit intent, declare an <intent-filter>
in your app's manifest file with a <category>
of
CATEGORY_APP_MARKET
.
فونت ایموجی مبتنی بر PNG حذف شد
The legacy, PNG-based emoji font file (NotoColorEmojiLegacy.ttf
) has been
removed, leaving just the vector-based file. Beginning with Android 13 (API
level 33), the emoji font file used by the system emoji renderer changed from a
PNG-based file to a vector based file. The system retained
the legacy font file in Android 13 and 14 for compatibility reasons, so that
apps with their own font renderers could continue to use the legacy font file
until they were able to upgrade.
To check if your app is affected, search your app's code for references to the
NotoColorEmojiLegacy.ttf
file.
You can choose to adapt your app in a number of ways:
- Use platform APIs for text rendering. You can render text to a bitmap-backed
Canvas
and use that to get a raw image if necessary. - Add COLRv1 font support to your app. The FreeType open source library supports COLRv1 in version 2.13.0 and higher.
- As a last resort, you can bundle the legacy emoji font file
(
NotoColorEmoji.ttf
) into your APK, although in that case your app will be missing the latest emoji updates. For more information, see the Noto Emoji GitHub project page.
حداقل نسخه SDK هدف از 23 به 24 افزایش یافت
Android 15 builds on the
the changes that were made in Android 14 and extends this
security further. In Android 15, apps with a
targetSdkVersion
lower than 24 can't be installed.
Requiring apps to meet modern API levels helps to ensure better security and
privacy.
Malware often targets lower API levels in order to bypass security and privacy
protections that have been introduced in higher Android versions. For example,
some malware apps use a targetSdkVersion
of 22 to avoid being subjected to the
runtime permission model introduced in 2015 by Android 6.0 Marshmallow (API
level 23). This Android 15 change makes it harder for malware to avoid security
and privacy improvements. Attempting to install an app targeting a lower API
level results in an installation failure, with a message like the following one
appearing in Logcat:
INSTALL_FAILED_DEPRECATED_SDK_VERSION: App package must target at least SDK version 24, but found 7
On devices upgrading to Android 15, any apps with a targetSdkVersion
lower
than 24 remain installed.
If you need to test an app targeting an older API level, use the following ADB command:
adb install --bypass-low-target-sdk-block FILENAME.apk
امنیت و حریم خصوصی
Android 15 اقدامات قوی را برای مبارزه با تقلب با رمز عبور یکبار مصرف (OTP) و محافظت از محتوای حساس کاربر، با تمرکز بر سختتر کردن سرویس شنونده اعلان و محافظتهای اشتراکگذاری صفحه نمایش، معرفی میکند. پیشرفتهای کلیدی شامل ویرایش OTPها از اعلانهای قابل دسترسی به برنامههای غیرقابل اعتماد، پنهان کردن اعلانها در حین اشتراکگذاری صفحه، و ایمن کردن فعالیتهای برنامه هنگام پست شدن OTP است. هدف این تغییرات حفظ محتوای حساس کاربر در برابر عوامل غیرمجاز است.
توسعه دهندگان برای اطمینان از سازگاری برنامه هایشان با تغییرات اندروید 15 باید از موارد زیر آگاه باشند:
ویرایش OTP
Android برنامههای غیرقابل اعتمادی که NotificationListenerService
اجرا میکنند را از خواندن محتوای ویرایش نشده از اعلانهایی که در آن OTP شناسایی شده است، متوقف میکند. برنامههای مورد اعتماد مانند انجمنهای مدیریت دستگاه همراه از این محدودیتها مستثنی هستند.
حفاظت از اشتراک گذاری صفحه نمایش
- محتوای اعلان در طول جلسات اشتراکگذاری صفحه پنهان میشود تا حریم خصوصی کاربر حفظ شود. اگر برنامه
setPublicVersion()
پیاده سازی کند، Android نسخه عمومی اعلان را نشان می دهد که به عنوان یک اعلان جایگزین در زمینه های ناامن عمل می کند. در غیر این صورت، محتوای اعلان بدون هیچ زمینه دیگری ویرایش می شود. - محتوای حساس مانند ورودی رمز عبور از بینندگان راه دور پنهان می شود تا از افشای اطلاعات حساس کاربر جلوگیری شود.
- فعالیتهای برنامههایی که در حین اشتراکگذاری صفحه نمایش، جایی که OTP شناسایی شده است، اعلان ارسال میکنند، پنهان میشوند. محتوای برنامه هنگام راه اندازی از نمایشگر راه دور پنهان می شود.
- علاوه بر شناسایی خودکار فیلدهای حساس اندروید، توسعهدهندگان میتوانند با استفاده از
setContentSensitivity
که در حین اشتراکگذاری صفحه نمایش از بینندگان راه دور پنهان میشود، بهطور دستی بخشهایی از برنامه خود را بهعنوان حساس علامتگذاری کنند. - توسعهدهندگان میتوانند گزینه غیرفعال کردن محافظتهای اشتراکگذاری صفحه را در زیر گزینههای توسعهدهنده تغییر دهند تا از محافظتهای اشتراکگذاری صفحه برای اهداف آزمایشی یا آزمایشی مستثنی شوند. ضبط کننده صفحه پیش فرض سیستم از این تغییرات مستثنی است، زیرا ضبط ها روی دستگاه باقی می مانند.
Android 15 اقدامات قوی را برای مبارزه با تقلب با رمز عبور یکبار مصرف (OTP) و محافظت از محتوای حساس کاربر، با تمرکز بر سختتر کردن سرویس شنونده اعلان و محافظتهای اشتراکگذاری صفحه نمایش، معرفی میکند. پیشرفتهای کلیدی شامل ویرایش OTPها از اعلانهای قابل دسترسی به برنامههای غیرقابل اعتماد، پنهان کردن اعلانها در حین اشتراکگذاری صفحه، و ایمن کردن فعالیتهای برنامه هنگام پست شدن OTP است. هدف این تغییرات حفظ محتوای حساس کاربر در برابر عوامل غیرمجاز است.
توسعه دهندگان برای اطمینان از سازگاری برنامه هایشان با تغییرات اندروید 15 باید از موارد زیر آگاه باشند:
ویرایش OTP
Android برنامههای غیرقابل اعتمادی که NotificationListenerService
اجرا میکنند را از خواندن محتوای ویرایش نشده از اعلانهایی که در آن OTP شناسایی شده است، متوقف میکند. برنامههای مورد اعتماد مانند انجمنهای مدیریت دستگاه همراه از این محدودیتها مستثنی هستند.
حفاظت از اشتراک گذاری صفحه نمایش
- محتوای اعلان در طول جلسات اشتراکگذاری صفحه پنهان میشود تا حریم خصوصی کاربر حفظ شود. اگر برنامه
setPublicVersion()
پیاده سازی کند، Android نسخه عمومی اعلان را نشان می دهد که به عنوان یک اعلان جایگزین در زمینه های ناامن عمل می کند. در غیر این صورت، محتوای اعلان بدون هیچ زمینه دیگری ویرایش می شود. - محتوای حساس مانند ورودی رمز عبور از بینندگان راه دور پنهان می شود تا از افشای اطلاعات حساس کاربر جلوگیری شود.
- فعالیتهای برنامههایی که در حین اشتراکگذاری صفحه نمایش، جایی که OTP شناسایی شده است، اعلان ارسال میکنند، پنهان میشوند. محتوای برنامه هنگام راه اندازی از نمایشگر راه دور پنهان می شود.
- علاوه بر شناسایی خودکار فیلدهای حساس اندروید، توسعهدهندگان میتوانند با استفاده از
setContentSensitivity
که در حین اشتراکگذاری صفحه نمایش از بینندگان راه دور پنهان میشود، بهطور دستی بخشهایی از برنامه خود را بهعنوان حساس علامتگذاری کنند. - توسعهدهندگان میتوانند گزینه غیرفعال کردن محافظتهای اشتراکگذاری صفحه را در زیر گزینههای توسعهدهنده تغییر دهند تا از محافظتهای اشتراکگذاری صفحه برای اهداف آزمایشی یا آزمایشی مستثنی شوند. ضبط کننده صفحه پیش فرض سیستم از این تغییرات مستثنی است، زیرا ضبط ها روی دستگاه باقی می مانند.
دوربین و رسانه
اندروید 15 تغییرات زیر را در رفتار دوربین و رسانه برای همه برنامه ها ایجاد می کند.
پخش مستقیم و بدون بارگیری آهنگ های صوتی که قبلاً باز شده یا مستقیماً بارگیری شده اند با رسیدن به محدودیت های منابع، باطل می شوند.
在 Android 15 之前,如果某个应用在另一个应用播放音频且达到资源限制时请求直接或分流音频播放,该应用将无法打开新的 AudioTrack
。
从 Android 15 开始,当应用请求直接播放或分流播放且达到资源限制时,系统会使任何当前打开的 AudioTrack
对象失效,以防止执行新轨道请求。
(直接音轨和分流音轨通常会打开,以播放压缩音频格式。播放直接音频的常见用例包括通过 HDMI 将编码的音频流式传输到电视。分流轨道通常用于在具有硬件 DSP 加速的移动设备上播放压缩音频。)
تجربه کاربری و رابط کاربری سیستم
اندروید 15 شامل تغییراتی است که برای ایجاد یک تجربه کاربری سازگارتر و بصری در نظر گرفته شده است.
انیمیشنهای پیشبینیکننده پشتی برای برنامههایی که شرکت کردهاند فعال شد
با شروع اندروید 15، گزینه توسعه دهنده برای انیمیشن های پیش بینی کننده پشت حذف شده است. اکنون انیمیشنهای سیستمی مانند بازگشت به خانه، تکلیف متقابل و فعالیت متقابل برای برنامههایی ظاهر میشوند که به طور کامل یا در سطح فعالیت در ژست بازگشت پیشبینیکننده شرکت کردهاند . اگر برنامه شما تحت تأثیر قرار گرفته است، اقدامات زیر را انجام دهید:
- مطمئن شوید که برنامه شما به درستی منتقل شده است تا از ژست بازگشت پیش بینی کننده استفاده کنید.
- اطمینان حاصل کنید که انتقال قطعه شما با ناوبری پیشبینی کننده به عقب کار میکند.
- از انتقال انیمیشن و فریمورک دور شوید و به جای آن از انتقال انیماتور و اندرویدکس استفاده کنید.
- از پشتههایی که
FragmentManager
از آنها اطلاعی ندارد، مهاجرت کنید. به جای آن از پشته های پشته ای استفاده کنید که توسطFragmentManager
یا مؤلفه Navigation مدیریت می شوند.
وقتی کاربر برنامهای را به اجبار متوقف میکند، ابزارکها غیرفعال میشوند
If a user force-stops an app on a device running Android 15, the system temporarily disables all the app's widgets. The widgets are grayed out, and the user cannot interact with them. This is because beginning with Android 15, the system cancels all an app's pending intents when the app is force-stopped.
The system re-enables those widgets the next time the user launches the app.
For more information, see Changes to package stopped state.
تراشه نوار وضعیت نمایش رسانه به کاربران از اشتراکگذاری صفحه نمایش، ارسال محتوا و ضبط هشدار میدهد
屏幕投影漏洞会泄露用户的私密数据(例如财务信息),因为用户不知道自己的设备屏幕正在共享。
对于搭载 Android 15 QPR1 或更高版本的设备上运行的应用,系统会在状态栏中显示一个醒目的大条状标签,以提醒用户正在进行的任何屏幕投影。用户可以点按该条状标签,停止共享、投放或录制其屏幕。此外,当设备屏幕锁定时,屏幕投影会自动停止。

Check if your app is impacted
By default, your app includes the status bar chip and automatically suspends screen projection when the lock screen activates.
To learn more about how to test your app for these use cases, see Status bar chip and auto stop.
محدودیت های دسترسی به شبکه پس زمینه
In Android 15, apps that start a network request outside of a valid process
lifecycle receive an exception. Typically, an
UnknownHostException
or other socket-related
IOException
. Network requests that happen outside of a valid lifecycle are
usually due to apps unknowingly continuing a network request even after the app
is no longer active.
To mitigate this exception, ensure your network requests are lifecycle aware and cancelled upon leaving a valid process lifecycle by using lifecycle aware components. If it is important that the network request should happen even when the user leaves the application, consider scheduling the network request using WorkManager or continue a user visible task using Foreground Service.
تحقیرها
با هر انتشار، APIهای خاص Android ممکن است منسوخ شوند یا برای ارائه تجربه بهتر توسعهدهنده یا پشتیبانی از قابلیتهای پلتفرم جدید نیاز به بازسازی داشته باشند. در این موارد، ما رسماً API های منسوخ شده را منسوخ می کنیم و توسعه دهندگان را به API های جایگزین هدایت می کنیم تا به جای آن از آنها استفاده کنند.
منسوخ شدن به این معنی است که ما به پشتیبانی رسمی از API ها پایان داده ایم، اما آنها همچنان در دسترس توسعه دهندگان خواهند بود. برای کسب اطلاعات بیشتر در مورد منسوخ شدن های قابل توجه در این نسخه از Android، به صفحه منسوخ شدن ها مراجعه کنید.