পূর্ববর্তী রিলিজগুলোর মতোই, অ্যান্ড্রয়েড ১৫-এ এমন কিছু আচরণগত পরিবর্তন রয়েছে যা আপনার অ্যাপকে প্রভাবিত করতে পারে। নিম্নলিখিত আচরণগত পরিবর্তনগুলো শুধুমাত্র সেইসব অ্যাপের জন্য প্রযোজ্য যেগুলো অ্যান্ড্রয়েড ১৫ বা তার উচ্চতর সংস্করণকে টার্গেট করছে। যদি আপনার অ্যাপটি অ্যান্ড্রয়েড ১৫ বা তার উচ্চতর সংস্করণকে টার্গেট করে থাকে, তবে প্রযোজ্য ক্ষেত্রে এই আচরণগুলোকে সঠিকভাবে সমর্থন করার জন্য আপনার অ্যাপটি পরিবর্তন করা উচিত।
আপনার অ্যাপের targetSdkVersion নির্বিশেষে Android 15-এ চালিত সমস্ত অ্যাপকে প্রভাবিত করে এমন আচরণগত পরিবর্তনের তালিকাটিও পর্যালোচনা করতে ভুলবেন না।
মূল কার্যকারিতা
অ্যান্ড্রয়েড ১৫ অ্যান্ড্রয়েড সিস্টেমের বিভিন্ন মূল সক্ষমতাকে পরিবর্তন বা প্রসারিত করে।
ফোরগ্রাউন্ড পরিষেবাগুলিতে পরিবর্তন
We are making the following changes to foreground services with Android 15.
- Data sync foreground service timeout behavior
- New media processing foreground service type
- Restrictions on
BOOT_COMPLETEDbroadcast receivers launching foreground services - Restrictions on starting foreground services while an app holds the
SYSTEM_ALERT_WINDOWpermission
Data sync foreground service timeout behavior
Android 15 introduces a new timeout behavior to dataSync for apps targeting
Android 15 (API level 35) or higher. This behavior also applies to the new
mediaProcessing foreground service type.
The system permits an app's dataSync services to run for a total of 6 hours
in a 24-hour period, after which the system calls the running service's
Service.onTimeout(int, int) method (introduced in Android
15). At this time, the service has a few seconds to call
Service.stopSelf(). When Service.onTimeout() is called, the
service is no longer considered a foreground service. If the service does not
call Service.stopSelf(), the system throws an internal exception. The
exception is logged in Logcat with the following message:
Fatal Exception: android.app.RemoteServiceException: "A foreground service of
type dataSync did not stop within its timeout: [component name]"
To avoid problems with this behavior change, you can do one or more of the following:
- Have your service implement the new
Service.onTimeout(int, int)method. When your app receives the callback, make sure to callstopSelf()within a few seconds. (If you don't stop the app right away, the system generates a failure.) - Make sure your app's
dataSyncservices don't run for more than a total of 6 hours in any 24-hour period (unless the user interacts with the app, resetting the timer). - Only start
dataSyncforeground services as a result of direct user interaction; since your app is in the foreground when the service starts, your service has the full six hours after the app goes to the background. - Instead of using a
dataSyncforeground service, use an alternative API.
If your app's dataSync foreground services have run for 6 hours in the last
24, you cannot start another dataSync foreground service unless the user
has brought your app to the foreground (which resets the timer). If you try to
start another dataSync foreground service, the system throws
ForegroundServiceStartNotAllowedException
with an error message like "Time limit already exhausted for foreground service
type dataSync".
Testing
To test your app's behavior, you can enable data sync timeouts even if your app
is not targeting Android 15 (as long as the app is running on an Android 15
device). To enable timeouts, run the following adb command:
adb shell am compat enable FGS_INTRODUCE_TIME_LIMITS your-package-name
You can also adjust the timeout period, to make it easier to test how your
app behaves when the limit is reached. To set a new timeout period, run the
following adb command:
adb shell device_config put activity_manager data_sync_fgs_timeout_duration duration-in-milliseconds
New media processing foreground service type
Android 15 একটি নতুন ফোরগ্রাউন্ড পরিষেবার ধরণ প্রবর্তন করেছে, mediaProcessing । এই পরিষেবার ধরন মিডিয়া ফাইল ট্রান্সকোড করার মত অপারেশনের জন্য উপযুক্ত। উদাহরণস্বরূপ, একটি মিডিয়া অ্যাপ একটি অডিও ফাইল ডাউনলোড করতে পারে এবং এটি চালানোর আগে এটিকে একটি ভিন্ন বিন্যাসে রূপান্তর করতে হবে। আপনি একটি mediaProcessing ফোরগ্রাউন্ড পরিষেবা ব্যবহার করতে পারেন যাতে অ্যাপটি ব্যাকগ্রাউন্ডে থাকা সত্ত্বেও রূপান্তর অব্যাহত থাকে।
সিস্টেমটি একটি অ্যাপের mediaProcessing পরিষেবাগুলিকে 24-ঘণ্টার মধ্যে মোট 6 ঘন্টা চালানোর অনুমতি দেয়, তারপরে সিস্টেমটি চলমান পরিষেবাটির Service.onTimeout(int, int) পদ্ধতিকে কল করে (অ্যান্ড্রয়েড 15 এ প্রবর্তিত)৷ এই সময়ে, পরিষেবাটিতে Service.stopSelf() কল করার জন্য কয়েক সেকেন্ড সময় আছে। যদি পরিষেবাটি Service.stopSelf() কল না করে, তবে সিস্টেমটি একটি অভ্যন্তরীণ ব্যতিক্রম নিক্ষেপ করে৷ ব্যতিক্রম নিম্নলিখিত বার্তার সাথে Logcat লগ ইন করা হয়েছে:
Fatal Exception: android.app.RemoteServiceException: "A foreground service of
type mediaProcessing did not stop within its timeout: [component name]"
ব্যতিক্রম এড়াতে, আপনি নিম্নলিখিতগুলির মধ্যে একটি করতে পারেন:
- আপনার পরিষেবাকে নতুন
Service.onTimeout(int, int)পদ্ধতি প্রয়োগ করতে দিন। আপনার অ্যাপ কলব্যাক গ্রহণ করলে, কয়েক সেকেন্ডের মধ্যেstopSelf()কল করতে ভুলবেন না। (যদি আপনি এখনই অ্যাপটি বন্ধ না করেন তবে সিস্টেমটি একটি ব্যর্থতা তৈরি করে।) - নিশ্চিত করুন যে আপনার অ্যাপের
mediaProcessingপরিষেবাগুলি যে কোনও 24-ঘন্টা সময়ের মধ্যে মোট 6 ঘন্টার বেশি চলবে না (যদি না ব্যবহারকারী অ্যাপের সাথে ইন্টারঅ্যাক্ট করে, টাইমার রিসেট করে)। - শুধুমাত্র সরাসরি ব্যবহারকারীর মিথস্ক্রিয়ার ফলে
mediaProcessingফোরগ্রাউন্ড পরিষেবা শুরু করুন; যেহেতু পরিষেবাটি শুরু হওয়ার সময় আপনার অ্যাপটি ফোরগ্রাউন্ডে থাকে, তাই অ্যাপটি ব্যাকগ্রাউন্ডে যাওয়ার পরে আপনার পরিষেবার পুরো ছয় ঘন্টা থাকে। -
mediaProcessingফোরগ্রাউন্ড পরিষেবা ব্যবহার করার পরিবর্তে, একটি বিকল্প API ব্যবহার করুন, যেমন WorkManager।
যদি আপনার অ্যাপের mediaProcessing ফোরগ্রাউন্ড পরিষেবাগুলি গত 24-এর মধ্যে 6 ঘন্টা ধরে চলে থাকে, তবে ব্যবহারকারী আপনার অ্যাপটিকে ফোরগ্রাউন্ডে না আনলে আপনি অন্য mediaProcessing ফোরগ্রাউন্ড পরিষেবা শুরু করতে পারবেন না (যা টাইমার রিসেট করে)। আপনি যদি অন্য mediaProcessing ফোরগ্রাউন্ড পরিষেবা শুরু করার চেষ্টা করেন, তাহলে সিস্টেমটি "ফোরগ্রাউন্ড সার্ভিস টাইপ মিডিয়াপ্রসেসিং এর জন্য ইতিমধ্যেই শেষ হয়ে গেছে" এর মতো একটি ত্রুটি বার্তা সহ ForegroundServiceStartNotAllowedException ছুড়ে দেয়।
mediaProcessing পরিষেবার ধরন সম্পর্কে আরও তথ্যের জন্য, Android 15: মিডিয়া প্রসেসিং-এর জন্য অগ্রভাগের পরিষেবার প্রকারগুলিতে পরিবর্তনগুলি দেখুন৷
টেস্টিং
আপনার অ্যাপের আচরণ পরীক্ষা করার জন্য, আপনি মিডিয়া প্রসেসিং টাইমআউট সক্ষম করতে পারেন এমনকি যদি আপনার অ্যাপ অ্যান্ড্রয়েড 15 টার্গেট না করে (যতক্ষণ অ্যাপটি অ্যান্ড্রয়েড 15 ডিভাইসে চলছে)। টাইমআউট সক্ষম করতে, নিম্নলিখিত adb কমান্ডটি চালান:
adb shell am compat enable FGS_INTRODUCE_TIME_LIMITS your-package-name
আপনি টাইমআউট পিরিয়ড সামঞ্জস্য করতে পারেন, সীমা পৌঁছে গেলে আপনার অ্যাপ কীভাবে আচরণ করে তা পরীক্ষা করা সহজ করতে। একটি নতুন টাইমআউট পিরিয়ড সেট করতে, নিম্নলিখিত adb কমান্ডটি চালান:
adb shell device_config put activity_manager media_processing_fgs_timeout_duration duration-in-milliseconds
Restrictions on BOOT_COMPLETED broadcast receivers launching foreground services
There are new restrictions on BOOT_COMPLETED broadcast receivers launching
foreground services. BOOT_COMPLETED receivers are not allowed to launch the
following types of foreground services:
dataSynccameramediaPlaybackphoneCallmediaProjectionmicrophone(this restriction has been in place formicrophonesince Android 14)
If a BOOT_COMPLETED receiver tries to launch any of those types of foreground
services, the system throws ForegroundServiceStartNotAllowedException.
Testing
To test your app's behavior, you can enable these new restrictions even if your
app is not targeting Android 15 (as long as the app is running on an Android 15
device). Run the following adb command:
adb shell am compat enable FGS_BOOT_COMPLETED_RESTRICTIONS your-package-name
To send a BOOT_COMPLETED broadcast without restarting the device,
run the following adb command:
adb shell am broadcast -a android.intent.action.BOOT_COMPLETED your-package-name
Restrictions on starting foreground services while an app holds the SYSTEM_ALERT_WINDOW permission
Previously, if an app held the SYSTEM_ALERT_WINDOW permission, it could launch
a foreground service even if the app was currently in the background (as
discussed in exemptions from background start restrictions).
If an app targets Android 15, this exemption is now narrower. The app now needs
to have the SYSTEM_ALERT_WINDOW permission and also have a visible overlay
window. That is, the app needs to first launch a
TYPE_APPLICATION_OVERLAY window and the window
needs to be visible before you start a foreground service.
If your app attempts to start a foreground service from the background without
meeting these new requirements (and it does not have some other exemption), the
system throws ForegroundServiceStartNotAllowedException.
If your app declares the SYSTEM_ALERT_WINDOW permission
and launches foreground services from the background, it may be affected by this
change. If your app gets a ForegroundServiceStartNotAllowedException, check
your app's order of operations and make sure your app already has an active
overlay window before it attempts to start a foreground service from the
background. You can check if your overlay window is currently visible
by calling View.getWindowVisibility(), or you
can override View.onWindowVisibilityChanged()
to get notified whenever the visibility changes.
Testing
To test your app's behavior, you can enable these new restrictions even if your
app is not targeting Android 15 (as long as the app is running on an Android 15
device). To enable these new restrictions on starting foreground services
from the background, run the following adb command:
adb shell am compat enable FGS_SAW_RESTRICTIONS your-package-name
অ্যাপগুলো কখন ডু নট ডিস্টার্ব মোডের গ্লোবাল স্টেট পরিবর্তন করতে পারবে, সেই নিয়মে পরিবর্তন আনা হয়েছে।
যে অ্যাপগুলি Android 15 (API লেভেল 35) এবং উচ্চতরকে টার্গেট করে তারা আর কোনও ডিভাইসে গ্লোবাল স্টেট বা Do Not Disturb (DND) এর নীতি পরিবর্তন করতে পারে না (হয় ব্যবহারকারী সেটিংস পরিবর্তন করে বা DND মোড বন্ধ করে)। পরিবর্তে, অ্যাপগুলিকে অবশ্যই একটি AutomaticZenRule অবদান রাখতে হবে, যা সিস্টেমটি বিদ্যমান সর্বাধিক-নিষেধমূলক-নীতি-জয় স্কিমের সাথে একটি বৈশ্বিক নীতিতে একত্রিত করে। বিদ্যমান API-এ কল যা পূর্বে গ্লোবাল স্টেটকে প্রভাবিত করেছিল ( setInterruptionFilter , setNotificationPolicy ) এর ফলে একটি অন্তর্নিহিত AutomaticZenRule তৈরি বা আপডেট হয়, যা সেই API কলগুলির কল-চক্রের উপর নির্ভর করে টগল করা এবং বন্ধ করা হয়।
মনে রাখবেন যে এই পরিবর্তনটি শুধুমাত্র পর্যবেক্ষণযোগ্য আচরণকে প্রভাবিত করে যদি অ্যাপটি setInterruptionFilter(INTERRUPTION_FILTER_ALL) কল করে এবং আশা করে যে কলটি একটি AutomaticZenRule নিষ্ক্রিয় করবে যা আগে তাদের মালিকদের দ্বারা সক্রিয় করা হয়েছিল৷
OpenJDK API পরিবর্তন
Android 15 continues the work of refreshing Android's core libraries to align with the features in the latest OpenJDK LTS releases.
Some of these changes can affect app compatibility for apps targeting Android 15 (API level 35):
Changes to string formatting APIs: Validation of argument index, flags, width, and precision are now more strict when using the following
String.format()andFormatter.format()APIs:String.format(String, Object[])String.format(Locale, String, Object[])Formatter.format(String, Object[])Formatter.format(Locale, String, Object[])
For example, the following exception is thrown when an argument index of 0 is used (
%0in the format string):IllegalFormatArgumentIndexException: Illegal format argument index = 0In this case, the issue can be fixed by using an argument index of 1 (
%1in the format string).Changes to component type of
Arrays.asList(...).toArray(): When usingArrays.asList(...).toArray(), the component type of the resulting array is now anObject—not the type of the underlying array's elements. So the following code throws aClassCastException:String[] elements = (String[]) Arrays.asList("one", "two").toArray();For this case, to preserve
Stringas the component type in the resulting array, you could useCollection.toArray(Object[])instead:String[] elements = Arrays.asList("two", "one").toArray(new String[0]);Changes to language code handling: When using the
LocaleAPI, language codes for Hebrew, Yiddish, and Indonesian are no longer converted to their obsolete forms (Hebrew:iw, Yiddish:ji, and Indonesian:in). When specifying the language code for one of these locales, use the codes from ISO 639-1 instead (Hebrew:he, Yiddish:yi, and Indonesian:id).Changes to random int sequences: Following the changes made in https://bugs.openjdk.org/browse/JDK-8301574, the following
Random.ints()methods now return a different sequence of numbers than theRandom.nextInt()methods do:Generally, this change shouldn't result in app-breaking behavior, but your code shouldn't expect the sequence generated from
Random.ints()methods to matchRandom.nextInt().
The new SequencedCollection API can affect your app's compatibility
after you update compileSdk in your app's build configuration to use
Android 15 (API level 35):
Collision with
MutableList.removeFirst()andMutableList.removeLast()extension functions inkotlin-stdlibThe
Listtype in Java is mapped to theMutableListtype in Kotlin. Because theList.removeFirst()andList.removeLast()APIs have been introduced in Android 15 (API level 35), the Kotlin compiler resolves function calls, for examplelist.removeFirst(), statically to the newListAPIs instead of to the extension functions inkotlin-stdlib.If an app is re-compiled with
compileSdkset to35andminSdkset to34or lower, and then the app is run on Android 14 and lower, a runtime error is thrown:java.lang.NoSuchMethodError: No virtual method removeFirst()Ljava/lang/Object; in class Ljava/util/ArrayList;The existing
NewApilint option in Android Gradle Plugin can catch these new API usages../gradlew lintMainActivity.kt:41: Error: Call requires API level 35 (current min is 34): java.util.List#removeFirst [NewApi] list.removeFirst()To fix the runtime exception and lint errors, the
removeFirst()andremoveLast()function calls can be replaced withremoveAt(0)andremoveAt(list.lastIndex)respectively in Kotlin. If you're using Android Studio Ladybug | 2024.1.3 or higher, it also provides a quick fix option for these errors.Consider removing
@SuppressLint("NewApi")andlintOptions { disable 'NewApi' }if the lint option has been disabled.Collision with other methods in Java
New methods have been added into the existing types, for example,
ListandDeque. These new methods might not be compatible with the methods with the same name and argument types in other interfaces and classes. In the case of a method signature collision with incompatibility, thejavaccompiler outputs a build-time error. For example:Example error 1:
javac MyList.javaMyList.java:135: error: removeLast() in MyList cannot implement removeLast() in List public void removeLast() { ^ return type void is not compatible with Object where E is a type-variable: E extends Object declared in interface ListExample error 2:
javac MyList.javaMyList.java:7: error: types Deque<Object> and List<Object> are incompatible; public class MyList implements List<Object>, Deque<Object> { both define reversed(), but with unrelated return types 1 errorExample error 3:
javac MyList.javaMyList.java:43: error: types List<E#1> and MyInterface<E#2> are incompatible; public static class MyList implements List<Object>, MyInterface<Object> { class MyList inherits unrelated defaults for getFirst() from types List and MyInterface where E#1,E#2 are type-variables: E#1 extends Object declared in interface List E#2 extends Object declared in interface MyInterface 1 errorTo fix these build errors, the class implementing these interfaces should override the method with a compatible return type. For example:
@Override public Object getFirst() { return List.super.getFirst(); }
নিরাপত্তা
অ্যান্ড্রয়েড ১৫-এ এমন কিছু পরিবর্তন আনা হয়েছে যা সিস্টেমের নিরাপত্তা বাড়িয়ে অ্যাপ এবং ব্যবহারকারীদের ক্ষতিকর অ্যাপ থেকে সুরক্ষিত রাখতে সাহায্য করে।
সীমাবদ্ধ TLS সংস্করণ
Android 15 restricts the usage of TLS versions 1.0 and 1.1. These versions had previously been deprecated in Android, but are now disallowed for apps targeting Android 15.
সুরক্ষিত পটভূমি কার্যকলাপ চালু হয়
Android 15 protects users from malicious apps and gives them more control over their devices by adding changes that prevent malicious background apps from bringing other apps to the foreground, elevating their privileges, and abusing user interaction. Background activity launches have been restricted since Android 10 (API level 29).
Other changes
- Change
PendingIntentcreators to block background activity launches by default. This helps prevent apps from accidentally creating aPendingIntentthat could be abused by malicious actors. - Don't bring an app to the foreground unless the
PendingIntentsender allows it. This change aims to prevent malicious apps from abusing the ability to start activities in the background. By default, apps are not allowed to bring the task stack to the foreground unless the creator allows background activity launch privileges or the sender has background activity launch privileges. - Control how the top activity of a task stack can finish its task. If the top activity finishes a task, Android will go back to whichever task was last active. Moreover, if a non-top activity finishes its task, Android will go back to the home screen; it won't block the finish of this non-top activity.
- Prevent launching arbitrary activities from other apps into your own task. This change prevents malicious apps from phishing users by creating activities that appear to be from other apps.
- Block non-visible windows from being considered for background activity launches. This helps prevent malicious apps from abusing background activity launches to display unwanted or malicious content to users.
নিরাপদ উদ্দেশ্য
Android 15 introduces StrictMode for
intents.
In order to see detailed logs about Intent usage violations, use following
method:
Kotlin
fun onCreate() { StrictMode.setVmPolicy(VmPolicy.Builder() .detectUnsafeIntentLaunch() .build() ) }
Java
public void onCreate() { StrictMode.setVmPolicy(new VmPolicy.Builder() .detectUnsafeIntentLaunch() .build()); }
ব্যবহারকারীর অভিজ্ঞতা এবং সিস্টেম UI
অ্যান্ড্রয়েড ১৫-এ এমন কিছু পরিবর্তন আনা হয়েছে, যার উদ্দেশ্য হলো আরও সামঞ্জস্যপূর্ণ ও স্বজ্ঞামূলক ব্যবহারকারীর অভিজ্ঞতা তৈরি করা।
জানালার ভেতরের পরিবর্তন
There are two changes related to window insets in Android 15: edge-to-edge is enforced by default, and there are also configuration changes, such as the default configuration of system bars.
Edge-to-edge enforcement
অ্যান্ড্রয়েড ১৫ চালিত ডিভাইসগুলিতে অ্যাপগুলি ডিফল্টরূপে এজ-টু-এজ হয়, যদি অ্যাপটি অ্যান্ড্রয়েড ১৫ (এপিআই লেভেল ৩৫) টার্গেট করে তৈরি করা হয়।

এটি একটি ব্রেকিং চেঞ্জ যা আপনার অ্যাপের UI-কে নেতিবাচকভাবে প্রভাবিত করতে পারে। এই পরিবর্তনগুলো UI-এর নিম্নলিখিত অংশগুলোকে প্রভাবিত করবে:
- অঙ্গভঙ্গি হ্যান্ডেল নেভিগেশন বার
- ডিফল্টরূপে স্বচ্ছ।
- বটম অফসেট নিষ্ক্রিয় থাকায়, ইনসেট প্রয়োগ না করা হলে কন্টেন্ট সিস্টেম নেভিগেশন বারের পিছনে প্রদর্শিত হয়।
-
setNavigationBarColorএবংR.attr#navigationBarColorঅপ্রচলিত এবং জেসচার নেভিগেশনকে প্রভাবিত করে না। -
setNavigationBarContrastEnforcedএবংR.attr#navigationBarContrastEnforcedজেসচার নেভিগেশনের উপর কোনো প্রভাব ফেলে না।
- ৩-বোতাম নেভিগেশন
- ডিফল্টরূপে অস্বচ্ছতা ৮০% এ সেট করা থাকে এবং এর রঙ উইন্ডোর ব্যাকগ্রাউন্ডের সাথে মিলে যেতে পারে।
- বটম অফসেট নিষ্ক্রিয় করা হয়েছে, তাই ইনসেট প্রয়োগ না করা হলে কন্টেন্ট সিস্টেম নেভিগেশন বারের পিছনে প্রদর্শিত হয়।
- ডিফল্টরূপে
setNavigationBarColorএবংR.attr#navigationBarColorউইন্ডোর ব্যাকগ্রাউন্ডের সাথে মেলানোর জন্য সেট করা থাকে। এই ডিফল্টটি প্রয়োগ হওয়ার জন্য উইন্ডোর ব্যাকগ্রাউন্ড অবশ্যই একটি কালার ড্রয়েবল হতে হবে। এই API-টি এখন আর ব্যবহৃত হয় না, কিন্তু এটি এখনও ৩-বাটন নেভিগেশনকে প্রভাবিত করে। -
setNavigationBarContrastEnforcedএবংR.attr#navigationBarContrastEnforcedডিফল্টরূপে true থাকে, যা ৩-বাটন নেভিগেশন জুড়ে একটি ৮০% অস্বচ্ছ ব্যাকগ্রাউন্ড যোগ করে।
- স্ট্যাটাস বার
- ডিফল্টরূপে স্বচ্ছ।
- টপ অফসেট নিষ্ক্রিয় করা আছে, তাই ইনসেট প্রয়োগ না করা হলে কন্টেন্ট স্ট্যাটাস বারের পিছনে প্রদর্শিত হয়।
-
setStatusBarColorএবংR.attr#statusBarColorঅপ্রচলিত হয়ে গেছে এবং Android 15-এ এগুলোর কোনো প্রভাব নেই। -
setStatusBarContrastEnforcedএবংR.attr#statusBarContrastEnforcedঅপ্রচলিত হলেও Android 15-এ এখনও এগুলোর প্রভাব রয়েছে।
- ডিসপ্লে কাটআউট
- নন-ফ্লোটিং উইন্ডোগুলোর
layoutInDisplayCutoutModeঅবশ্যইLAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYSহতে হবে।SHORT_EDGES,NEVER, এবংDEFAULTALWAYSহিসেবে গণ্য করা হয়, যাতে ব্যবহারকারীরা ডিসপ্লে কাটআউটের কারণে সৃষ্ট কালো বার দেখতে না পান এবং উইন্ডোটি প্রান্ত থেকে প্রান্ত পর্যন্ত দেখা যায়।
- নন-ফ্লোটিং উইন্ডোগুলোর
নিম্নলিখিত উদাহরণটি অ্যান্ড্রয়েড ১৫ (এপিআই লেভেল ৩৫) টার্গেট করার আগে ও পরে এবং ইনসেট প্রয়োগ করার আগে ও পরের একটি অ্যাপ দেখাচ্ছে। এই উদাহরণটি সম্পূর্ণ নয়, অ্যান্ড্রয়েড অটোতে এটি ভিন্নভাবে প্রদর্শিত হতে পারে।



আপনার অ্যাপটি ইতিমধ্যে এজ-টু-এজ কিনা তা পরীক্ষা করতে হবে।
আপনার অ্যাপটি যদি ইতিমধ্যেই এজ-টু-এজ হয় এবং ইনসেট প্রয়োগ করে, তবে নিম্নলিখিত পরিস্থিতিগুলো ছাড়া আপনি মূলত অপ্রভাবিত থাকবেন। তবে, আপনি প্রভাবিত হচ্ছেন না বলে মনে করলেও, আমরা আপনাকে আপনার অ্যাপটি পরীক্ষা করার পরামর্শ দিচ্ছি।
- আপনার একটি নন-ফ্লোটিং উইন্ডো আছে, যেমন একটি
ActivityযাLAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYSএর পরিবর্তেSHORT_EDGES,NEVERবাDEFAULTব্যবহার করে। যদি আপনার অ্যাপ চালু হওয়ার সময় ক্র্যাশ করে, তবে এর কারণ আপনার স্প্ল্যাশস্ক্রিন হতে পারে। আপনি হয় কোর স্প্ল্যাশস্ক্রিন ডিপেন্ডেন্সিটি 1.2.0-alpha01 বা তার পরবর্তী সংস্করণে আপগ্রেড করতে পারেন অথবাwindow.attributes.layoutInDisplayCutoutMode = WindowManager.LayoutInDisplayCutoutMode.alwaysসেট করতে পারেন। - কম ব্যবহৃত কিছু স্ক্রিনের UI আড়াল হয়ে থাকতে পারে। যাচাই করুন যে এই কম ব্যবহৃত স্ক্রিনগুলিতে UI আড়াল হয়ে নেই। কম ব্যবহৃত স্ক্রিনগুলির মধ্যে রয়েছে:
- অনবোর্ডিং বা সাইন-ইন স্ক্রিন
- সেটিংস পৃষ্ঠাগুলি
আপনার অ্যাপটি যদি আগে থেকেই এজ-টু-এজ না হয়ে থাকে, তাহলে কী পরীক্ষা করতে হবে।
আপনার অ্যাপটি যদি ইতিমধ্যে এজ-টু-এজ না হয়ে থাকে, তাহলে সম্ভবত আপনি এর দ্বারা প্রভাবিত হবেন। যেসব অ্যাপ ইতিমধ্যে এজ-টু-এজ, সেগুলোর জন্য প্রযোজ্য পরিস্থিতিগুলোর পাশাপাশি আপনার নিম্নলিখিত বিষয়গুলো বিবেচনা করা উচিত:
- আপনার অ্যাপে যদি কম্পোজে Material 3 কম্পোনেন্ট (
androidx.compose.material3) ব্যবহৃত হয়, যেমনTopAppBar,BottomAppBar, এবংNavigationBar, তাহলে এই কম্পোনেন্টগুলো সম্ভবত প্রভাবিত হবে না , কারণ এগুলো স্বয়ংক্রিয়ভাবে ইনসেট পরিচালনা করে। - আপনার অ্যাপ যদি কম্পোজে ম্যাটেরিয়াল ২ কম্পোনেন্ট (
androidx.compose.material) ব্যবহার করে, তবে এই কম্পোনেন্টগুলো স্বয়ংক্রিয়ভাবে ইনসেটগুলো পরিচালনা করে না। তবে, আপনি ইনসেটগুলো অ্যাক্সেস করতে এবং ম্যানুয়ালি প্রয়োগ করতে পারেন। androidx.compose.material 1.6.0 এবং এর পরবর্তী সংস্করণগুলোতে,BottomAppBar,TopAppBar,BottomNavigation, এবংNavigationRailজন্য ইনসেটগুলো ম্যানুয়ালি প্রয়োগ করতেwindowInsetsপ্যারামিটারটি ব্যবহার করুন। একইভাবে,Scaffoldজন্যcontentWindowInsetsপ্যারামিটারটি ব্যবহার করুন। - আপনার অ্যাপে যদি ভিউ এবং ম্যাটেরিয়াল কম্পোনেন্ট (
com.google.android.material) ব্যবহৃত হয়, তাহলেBottomNavigationView,BottomAppBar,NavigationRailViewবাNavigationViewএর মতো বেশিরভাগ ভিউ-ভিত্তিক ম্যাটেরিয়াল কম্পোনেন্ট ইনসেট (inset) পরিচালনা করতে পারে এবং এর জন্য কোনো অতিরিক্ত কাজের প্রয়োজন হয় না। তবে,AppBarLayoutব্যবহার করলে আপনাকেandroid:fitsSystemWindows="true"যোগ করতে হবে। - কাস্টম কম্পোজেবলের জন্য, ইনসেটগুলো প্যাডিং হিসেবে ম্যানুয়ালি প্রয়োগ করুন। যদি আপনার কন্টেন্ট কোনো
Scaffoldমধ্যে থাকে, তাহলে আপনিScaffoldপ্যাডিং ভ্যালু ব্যবহার করে ইনসেটগুলো ব্যবহার করতে পারেন। অন্যথায়,WindowInsets) যেকোনো একটি ব্যবহার করে প্যাডিং প্রয়োগ করুন। - আপনার অ্যাপে যদি ভিউ এবং
BottomSheet,SideSheetবা কাস্টম কন্টেইনার ব্যবহার করা হয়, তাহলেViewCompat.setOnApplyWindowInsetsListenerব্যবহার করে প্যাডিং প্রয়োগ করুন।RecyclerViewএর ক্ষেত্রে, এই লিসেনারটি ব্যবহার করে প্যাডিং প্রয়োগ করুন এবং সাথেclipToPadding="false"যোগ করুন।
আপনার অ্যাপে কাস্টম ব্যাকগ্রাউন্ড সুরক্ষা থাকা আবশ্যক কিনা তা পরীক্ষা করতে হবে।
যদি আপনার অ্যাপকে ৩-বাটন নেভিগেশন বা স্ট্যাটাস বারের জন্য কাস্টম ব্যাকগ্রাউন্ড সুরক্ষা দিতেই হয়, তবে ৩-বাটন নেভিগেশন বারের উচ্চতা পাওয়ার জন্য WindowInsets.Type#tappableElement() অথবা WindowInsets.Type#statusBars ব্যবহার করে সিস্টেম বারের পিছনে একটি কম্পোজেবল বা ভিউ স্থাপন করা উচিত।
অতিরিক্ত প্রান্ত থেকে প্রান্ত পর্যন্ত সম্পদ
ইনসেট প্রয়োগের ক্ষেত্রে অতিরিক্ত বিবেচনার জন্য ‘ এজ টু এজ ভিউ’ এবং ‘এজ টু এজ কম্পোজ’ গাইডগুলো দেখুন।
অপ্রচলিত এপিআই
নিম্নলিখিত API-গুলি অপ্রচলিত কিন্তু নিষ্ক্রিয় করা হয়নি:
-
R.attr#enforceStatusBarContrast -
R.attr#navigationBarColor(৩টি বাটন নেভিগেশনের জন্য, ৮০% আলফা সহ) -
Window#isStatusBarContrastEnforced -
Window#setNavigationBarColor(৩টি বাটন নেভিগেশনের জন্য, ৮০% আলফা সহ) -
Window#setStatusBarContrastEnforced
নিম্নলিখিত API-গুলি অপ্রচলিত এবং নিষ্ক্রিয় করা হয়েছে:
-
R.attr#navigationBarColor(জেসচার নেভিগেশনের জন্য) -
R.attr#navigationBarDividerColor -
R.attr#statusBarColor -
Window#setDecorFitsSystemWindows -
Window#getNavigationBarColor -
Window#getNavigationBarDividerColor -
Window#getStatusBarColor -
Window#setNavigationBarColor(জেসচার নেভিগেশনের জন্য) -
Window#setNavigationBarDividerColor -
Window#setStatusBarColor
Stable configuration
আপনার অ্যাপটি যদি অ্যান্ড্রয়েড ১৫ (এপিআই লেভেল ৩৫) বা তার উচ্চতর সংস্করণকে টার্গেট করে, তাহলে Configuration আর সিস্টেম বারগুলোকে বাদ দেয় না। আপনি যদি লেআউট গণনার জন্য Configuration ক্লাসে স্ক্রিন সাইজ ব্যবহার করেন, তবে আপনার প্রয়োজন অনুযায়ী এটিকে একটি উপযুক্ত ViewGroup , WindowInsets , বা WindowMetricsCalculator মতো আরও ভালো বিকল্প দিয়ে প্রতিস্থাপন করা উচিত।
এপিআই ১ থেকেই Configuration উপলব্ধ রয়েছে। এটি সাধারণত Activity.onConfigurationChanged থেকে পাওয়া যায়। এটি উইন্ডোর ঘনত্ব, অভিমুখ এবং আকারের মতো তথ্য প্রদান করে। Configuration থেকে প্রাপ্ত উইন্ডোর আকারগুলোর একটি গুরুত্বপূর্ণ বৈশিষ্ট্য হলো, এটি পূর্বে সিস্টেম বারগুলোকে বাদ দিত।
কনফিগারেশন সাইজ সাধারণত রিসোর্স নির্বাচনের জন্য ব্যবহৃত হয়, যেমন /res/layout-h500dp , এবং এটি এখনও একটি বৈধ ব্যবহার। তবে, লেআউট গণনার জন্য এর ব্যবহারকে সবসময়ই নিরুৎসাহিত করা হয়েছে। আপনি যদি তা করে থাকেন, তবে আপনার এখনই এটি থেকে সরে আসা উচিত। আপনার ব্যবহারের ধরনের ওপর নির্ভর করে Configuration ব্যবহারকে আরও উপযুক্ত কিছু দিয়ে প্রতিস্থাপন করা উচিত।
লেআউট গণনা করার জন্য যদি এটি ব্যবহার করেন, তাহলে CoordinatorLayout বা ConstraintLayout মতো একটি উপযুক্ত ViewGroup ব্যবহার করুন। সিস্টেম নেভবারের উচ্চতা নির্ধারণ করতে যদি এটি ব্যবহার করেন, তাহলে WindowInsets ব্যবহার করুন। আপনার অ্যাপ উইন্ডোর বর্তমান আকার জানতে চাইলে computeCurrentWindowMetrics ব্যবহার করুন।
নিম্নলিখিত তালিকাটি এই পরিবর্তনের দ্বারা প্রভাবিত ক্ষেত্রগুলি বর্ণনা করে:
-
Configuration.screenWidthDpএবংscreenHeightDpসাইজগুলো থেকে এখন আর সিস্টেম বার বাদ দেওয়া হয় না। -
screenWidthDpএবংscreenHeightDpএর পরিবর্তনের দ্বারাConfiguration.smallestScreenWidthDpপরোক্ষভাবে প্রভাবিত হয়। - প্রায় বর্গাকার ডিভাইসগুলিতে
screenWidthDpএবংscreenHeightDpএর পরিবর্তনের ফলেConfiguration.orientationপরোক্ষভাবে প্রভাবিত হয়। -
Display.getSize(Point)পরোক্ষভাবেConfigurationএর পরিবর্তন দ্বারা প্রভাবিত হয়। API লেভেল 30 থেকে এটি অপ্রচলিত ঘোষণা করা হয়েছে। - API লেভেল ৩৩ থেকেই
Display.getMetrics()এইভাবেই কাজ করে আসছে।
elegantTextHeight অ্যাট্রিবিউটের ডিফল্ট মান true থাকে।
অ্যান্ড্রয়েড 15 (API স্তর 35) লক্ষ্য করা অ্যাপগুলির জন্য, elegantTextHeight TextView বৈশিষ্ট্যটি ডিফল্টরূপে true হয়ে যায়, ডিফল্টরূপে ব্যবহৃত কমপ্যাক্ট ফন্টটিকে এমন কিছু স্ক্রিপ্টের সাথে প্রতিস্থাপন করে যেখানে বড় উল্লম্ব মেট্রিক্স রয়েছে যা অনেক বেশি পাঠযোগ্য। বিন্যাস ভাঙা প্রতিরোধ করার জন্য কমপ্যাক্ট ফন্ট চালু করা হয়েছিল; অ্যান্ড্রয়েড 13 (এপিআই লেভেল 33) fallbackLineSpacing অ্যাট্রিবিউট ব্যবহার করে টেক্সট লেআউটকে উল্লম্ব উচ্চতা প্রসারিত করার অনুমতি দিয়ে এই ধরনের অনেক ভাঙন প্রতিরোধ করে।
অ্যান্ড্রয়েড 15-এ, কমপ্যাক্ট ফন্টটি এখনও সিস্টেমে রয়ে গেছে, তাই আপনার অ্যাপটি আগের মতো একই আচরণ পেতে elegantTextHeight false সেট করতে পারে, তবে এটি আসন্ন রিলিজে সমর্থিত হওয়ার সম্ভাবনা কম। সুতরাং, যদি আপনার অ্যাপ নিম্নলিখিত স্ক্রিপ্টগুলিকে সমর্থন করে: আরবি, লাও, মায়ানমার, তামিল, গুজরাটি, কন্নড়, মালয়ালম, ওড়িয়া, তেলুগু বা থাই, তাহলে আপনার অ্যাপটি true elegantTextHeight সেট করে পরীক্ষা করুন।

elegantTextHeight আচরণ। 
elegantTextHeight আচরণ।জটিল অক্ষরের আকারের জন্য TextView-এর প্রস্থ পরিবর্তিত হয়
In previous versions of Android, some cursive fonts or languages that have
complex shaping might draw the letters in the previous or next character's area.
In some cases, such letters were clipped at the beginning or ending position.
Starting in Android 15, a TextView allocates width for drawing enough space
for such letters and allows apps to request extra paddings to the left to
prevent clipping.
Because this change affects how a TextView decides the width, TextView
allocates more width by default if the app targets Android 15 (API level 35) or
higher. You can enable or disable this behavior by calling the
setUseBoundsForWidth API on TextView.
Because adding left padding might cause a misalignment for existing layouts, the
padding is not added by default even for apps that target Android 15 or higher.
However, you can add extra padding to preventing clipping by calling
setShiftDrawingOffsetForStartOverhang.
The following examples show how these changes can improve text layout for some fonts and languages.
<TextView android:fontFamily="cursive" android:text="java" />
<TextView android:fontFamily="cursive" android:text="java" android:useBoundsForWidth="true" android:shiftDrawingOffsetForStartOverhang="true" />
<TextView android:text="คอมพิวเตอร์" />
<TextView android:text="คอมพิวเตอร์" android:useBoundsForWidth="true" android:shiftDrawingOffsetForStartOverhang="true" />
EditText-এর জন্য লোকাল-সচেতন ডিফল্ট লাইন উচ্চতা
In previous versions of Android, the text layout stretched the height of the
text to meet the line height of the font that matched the current locale. For
example, if the content was in Japanese, because the line height of the Japanese
font is slightly larger than the one of a Latin font, the height of the text
became slightly larger. However, despite these differences in line heights, the
EditText element was sized uniformly, regardless
of the locale being used, as illustrated in the following image:
EditText elements that
can contain text from English (en), Japanese (ja), and Burmese (my). The
height of the EditText is the same, even though these languages
have different line heights from each other.For apps targeting Android 15 (API level 35), a minimum line height is now
reserved for EditText to match the reference font for the specified Locale, as
shown in the following image:
EditText elements that
can contain text from English (en), Japanese (ja), and Burmese (my). The
height of the EditText now includes space to accommodate the
default line height for these languages' fonts.If needed, your app can restore the previous behavior by specifying the
useLocalePreferredLineHeightForMinimum attribute
to false, and your app can set custom minimum vertical metrics using the
setMinimumFontMetrics API in Kotlin and Java.
ক্যামেরা এবং মিডিয়া
অ্যান্ড্রয়েড ১৫ বা তার উচ্চতর সংস্করণকে লক্ষ্য করে তৈরি অ্যাপগুলোর ক্যামেরা এবং মিডিয়ার আচরণে অ্যান্ড্রয়েড ১৫ নিম্নলিখিত পরিবর্তনগুলো এনেছে।
অডিও ফোকাস অনুরোধ করার উপর বিধিনিষেধ
Apps that target Android 15 (API level 35) must be the top app or running a
foreground service in order to request audio focus. If an app
attempts to request focus when it does not meet one of these requirements, the
call returns AUDIOFOCUS_REQUEST_FAILED.
You can learn more about audio focus at Manage audio focus.
আপডেট করা নন-এসডিকে বিধিনিষেধ
Android 15 includes updated lists of restricted non-SDK interfaces based on collaboration with Android developers and the latest internal testing. Whenever possible, we make sure that public alternatives are available before we restrict non-SDK interfaces.
If your app does not target Android 15, some of these changes might not immediately affect you. However, while it's possible for your app to access some non-SDK interfaces depending on your app's target API level, using any non-SDK method or field always carries a high risk of breaking your app.
If you are unsure if your app uses non-SDK interfaces, you can test your app to find out. If your app relies on non-SDK interfaces, you should begin planning a migration to SDK alternatives. Nevertheless, we understand that some apps have valid use cases for using non-SDK interfaces. If you can't find an alternative to using a non-SDK interface for a feature in your app, you should request a new public API.
To learn more about the changes in this release of Android, see Updates to non-SDK interface restrictions in Android 15. To learn more about non-SDK interfaces generally, see Restrictions on non-SDK interfaces.