আচরণ পরিবর্তন: সমস্ত অ্যাপ্লিকেশন

Android 16 প্ল্যাটফর্মে এমন আচরণগত পরিবর্তন রয়েছে যা আপনার অ্যাপকে প্রভাবিত করতে পারে। নিম্নলিখিত আচরণগত পরিবর্তনগুলি targetSdkVersion নির্বিশেষে, Android 16 এ চলা সমস্ত অ্যাপের ক্ষেত্রে প্রযোজ্য। আপনার অ্যাপটি পরীক্ষা করা উচিত এবং তারপরে প্রযোজ্য ক্ষেত্রে এই পরিবর্তনগুলি সমর্থন করার জন্য প্রয়োজন অনুসারে এটি পরিবর্তন করা উচিত।

শুধুমাত্র Android 16-কে লক্ষ্য করে এমন অ্যাপগুলিকে প্রভাবিত করে এমন আচরণগত পরিবর্তনের তালিকাটিও পর্যালোচনা করতে ভুলবেন না।

মূল কার্যকারিতা

অ্যান্ড্রয়েড ১৬ (এপিআই লেভেল ৩৬) এ নিম্নলিখিত পরিবর্তনগুলি অন্তর্ভুক্ত রয়েছে যা অ্যান্ড্রয়েড সিস্টেমের বিভিন্ন মূল ক্ষমতা পরিবর্তন বা প্রসারিত করে।

JobScheduler কোটা অপ্টিমাইজেশন

অ্যান্ড্রয়েড 16 থেকে শুরু করে, আমরা নিম্নলিখিত বিষয়গুলির উপর ভিত্তি করে নিয়মিত এবং দ্রুত কাজ সম্পাদনের রানটাইম কোটা সামঞ্জস্য করছি:

  • অ্যাপ্লিকেশানটি কোন অ্যাপ স্ট্যান্ডবাই বালতিতে রয়েছে : Android 16-এ, সক্রিয় স্ট্যান্ডবাই বাকেটগুলি উদার রানটাইম কোটা দ্বারা প্রয়োগ করা শুরু হবে৷
  • অ্যাপটি শীর্ষ অবস্থায় থাকাকালীন চাকরিটি কার্যকর করা শুরু করলে : Android 16-এ, অ্যাপটি ব্যবহারকারীর কাছে দৃশ্যমান থাকাকালীন চাকরি শুরু হয় এবং অ্যাপটি অদৃশ্য হয়ে যাওয়ার পরেও চলতে থাকে, চাকরির রানটাইম কোটা মেনে চলবে।
  • যদি একটি ফোরগ্রাউন্ড পরিষেবা চালানোর সময় কাজটি কার্যকর করা হয় : Android 16-এ, যে কাজগুলি একটি ফোরগ্রাউন্ড পরিষেবার সাথে একযোগে কাজ করছে সেগুলি চাকরির রানটাইম কোটা মেনে চলবে। আপনি যদি ব্যবহারকারীর সূচনাকৃত ডেটা স্থানান্তরের জন্য কাজের সুবিধা নিয়ে থাকেন, তবে পরিবর্তে ব্যবহারকারীর সূচিত ডেটা স্থানান্তর কাজগুলি ব্যবহার করার কথা বিবেচনা করুন।

এই পরিবর্তনটি WorkManager, JobScheduler, এবং DownloadManager ব্যবহার করে নির্ধারিত কাজগুলিকে প্রভাবিত করে৷ কেন একটি কাজ বন্ধ করা হয়েছিল তা ডিবাগ করার জন্য, আমরা WorkInfo.getStopReason() (JobScheduler কাজের জন্য, JobParameters.getStopReason() ) কল করে কল করে কেন আপনার কাজ বন্ধ করা হয়েছিল তা লগ করার পরামর্শ দিই।

আপনার অ্যাপের অবস্থা কীভাবে এটি ব্যবহার করতে পারে এমন সংস্থানগুলিকে প্রভাবিত করে সে সম্পর্কে তথ্যের জন্য, পাওয়ার ম্যানেজমেন্ট রিসোর্স সীমা দেখুন৷ ব্যাটারি-অনুকূল সর্বোত্তম অনুশীলন সম্পর্কে আরও তথ্যের জন্য, টাস্ক শিডিউলিং API-এর জন্য ব্যাটারি ব্যবহার অপ্টিমাইজ করার নির্দেশিকা পড়ুন।

আমরা Android 16-এ প্রবর্তিত নতুন JobScheduler#getPendingJobReasonsHistory API ব্যবহার করার পরামর্শ দিচ্ছি কেন একটি চাকরি কার্যকর করা হয়নি তা বোঝার জন্য।

টেস্টিং

আপনার অ্যাপের আচরণ পরীক্ষা করার জন্য, আপনি নির্দিষ্ট চাকরির কোটা অপ্টিমাইজেশনের ওভাররাইড সক্ষম করতে পারেন যতক্ষণ না অ্যাপটি একটি Android 16 ডিভাইসে চলছে।

"শীর্ষ রাষ্ট্র চাকরীর রানটাইম কোটা মেনে চলবে" এর প্রয়োগ অক্ষম করতে, নিম্নলিখিত adb কমান্ডটি চালান:

adb shell am compat enable OVERRIDE_QUOTA_ENFORCEMENT_TO_TOP_STARTED_JOBS APP_PACKAGE_NAME

"যে কাজগুলি একযোগে একটি ফোরগ্রাউন্ড পরিষেবার সাথে কাজ চালানোর সময় কাজ রানটাইম কোটা মেনে চলবে" এর প্রয়োগকে নিষ্ক্রিয় করতে, নিম্নলিখিত adb কমান্ডটি চালান:

adb shell am compat enable OVERRIDE_QUOTA_ENFORCEMENT_TO_FGS_JOBS APP_PACKAGE_NAME

নির্দিষ্ট অ্যাপ স্ট্যান্ডবাই বালতি আচরণ পরীক্ষা করতে, আপনি নিম্নলিখিত adb কমান্ড ব্যবহার করে আপনার অ্যাপের অ্যাপ স্ট্যান্ডবাই বাকেট সেট করতে পারেন:

adb shell am set-standby-bucket APP_PACKAGE_NAME active|working_set|frequent|rare|restricted

আপনার অ্যাপটি যে অ্যাপ স্ট্যান্ডবাই বালতিতে রয়েছে তা বোঝার জন্য, আপনি নিম্নলিখিত adb কমান্ড ব্যবহার করে আপনার অ্যাপের অ্যাপ স্ট্যান্ডবাই বাকেট পেতে পারেন:

adb shell am get-standby-bucket APP_PACKAGE_NAME

পরিত্যক্ত খালি চাকরি বন্ধের কারণ

An abandoned job occurs when the JobParameters object associated with the job has been garbage collected, but JobService#jobFinished(JobParameters, boolean) has not been called to signal job completion. This indicates that the job may be running and being rescheduled without the app's awareness.

Apps that rely on JobScheduler, don't maintain a strong reference to the JobParameters object, and timeout will now be granted the new job stop reason STOP_REASON_TIMEOUT_ABANDONED, instead of STOP_REASON_TIMEOUT.

If there are frequent occurrences of the new abandoned stop reason, the system will take mitigation steps to reduce job frequency.

Apps should use the new stop reason to detect and reduce abandoned jobs.

If you're using WorkManager, AsyncTask, or DownloadManager, you aren't impacted because these APIs manage the job lifecycle on your app's behalf.

JobInfo#setImportantWhileForeground সম্পূর্ণরূপে অবজ্ঞা করা হচ্ছে

The JobInfo.Builder#setImportantWhileForeground(boolean) method indicates the importance of a job while the scheduling app is in the foreground or when temporarily exempted from background restrictions.

This method has been deprecated since Android 12 (API level 31). Starting in Android 16, it no longer functions effectively and calling this method will be ignored.

This removal of functionality also applies to JobInfo#isImportantWhileForeground(). Starting in Android 16, if the method is called, the method returns false.

অর্ডার করা সম্প্রচার অগ্রাধিকার স্কোপ আর বিশ্বব্যাপী নেই

অ্যান্ড্রয়েড অ্যাপ্লিকেশানগুলিকে ব্রডকাস্ট রিসিভারগুলিতে অগ্রাধিকার নির্ধারণ করার অনুমতি দেওয়া হয় যাতে রিসিভারগুলি সম্প্রচারটি গ্রহণ করে এবং প্রক্রিয়া করে তা নিয়ন্ত্রণ করতে। ম্যানিফেস্ট-ঘোষিত রিসিভারগুলির জন্য, অ্যাপগুলি অগ্রাধিকার নির্ধারণ করতে android:priority বৈশিষ্ট্য ব্যবহার করতে পারে এবং প্রসঙ্গ-নিবন্ধিত রিসিভারগুলির জন্য, অ্যাপগুলি অগ্রাধিকার নির্ধারণ করতে IntentFilter#setPriority() API ব্যবহার করতে পারে৷ যখন একটি সম্প্রচার পাঠানো হয়, সিস্টেমটি সর্বোচ্চ থেকে সর্বনিম্ন পর্যন্ত তাদের অগ্রাধিকারের ক্রমানুসারে রিসিভারদের কাছে পৌঁছে দেয়।

Android 16-এ, বিভিন্ন প্রক্রিয়া জুড়ে android:priority অ্যাট্রিবিউট বা IntentFilter#setPriority() ব্যবহার করে ব্রডকাস্ট ডেলিভারি অর্ডার নিশ্চিত করা হবে না। সম্প্রচার অগ্রাধিকার শুধুমাত্র সমস্ত প্রক্রিয়ার পরিবর্তে একই আবেদন প্রক্রিয়ার মধ্যে সম্মান করা হবে।

এছাড়াও, সম্প্রচারের অগ্রাধিকারগুলি স্বয়ংক্রিয়ভাবে পরিসরে সীমাবদ্ধ থাকবে ( SYSTEM_LOW_PRIORITY + 1, SYSTEM_HIGH_PRIORITY - 1)৷ শুধুমাত্র সিস্টেমের উপাদানগুলিকে SYSTEM_LOW_PRIORITY , SYSTEM_HIGH_PRIORITY সম্প্রচার অগ্রাধিকার হিসাবে সেট করার অনুমতি দেওয়া হবে৷

আপনার অ্যাপটি নিম্নোক্ত যেকোনো একটি করলে প্রভাবিত হতে পারে:

  1. আপনার আবেদন একই সম্প্রচার অভিপ্রায় সহ একাধিক প্রক্রিয়া ঘোষণা করেছে এবং অগ্রাধিকারের উপর ভিত্তি করে একটি নির্দিষ্ট ক্রমে সেই অভিপ্রায়গুলি পাওয়ার আশেপাশে প্রত্যাশা রয়েছে৷
  2. আপনার আবেদন প্রক্রিয়া অন্যান্য প্রক্রিয়ার সাথে ইন্টারঅ্যাক্ট করে এবং একটি নির্দিষ্ট ক্রমে একটি সম্প্রচারের অভিপ্রায় প্রাপ্তির আশা রাখে।

যদি প্রক্রিয়াগুলি একে অপরের সাথে সমন্বয় করতে হয়, তবে তাদের অন্যান্য সমন্বয় চ্যানেল ব্যবহার করে যোগাযোগ করা উচিত।

শিল্পের অভ্যন্তরীণ পরিবর্তন

Android 16 includes the latest updates to the Android Runtime (ART) that improve the Android Runtime's (ART's) performance and provide support for additional Java features. Through Google Play System updates, these improvements are also available to over a billion devices running Android 12 (API level 31) and higher.

As these changes are released, libraries and app code that rely on internal structures of ART might not work correctly on devices running Android 16, along with earlier Android versions that update the ART module through Google Play system updates.

Relying on internal structures (such as non-SDK interfaces) can always lead to compatibility problems, but it's particularly important to avoid relying on code (or libraries containing code) that leverages internal ART structures, since ART changes aren't tied to the platform version the device is running on and they go out to over a billion devices through Google Play system updates.

All developers should check whether their app is impacted by testing their apps thoroughly on Android 16. In addition, check the known issues to see if your app depends on any libraries that we've identified that rely on internal ART structures. If you do have app code or library dependencies that are affected, seek public API alternatives whenever possible and request public APIs for new use cases by creating a feature request in our issue tracker.

১৬ কেবি পৃষ্ঠার আকার সামঞ্জস্য মোড

প্ল্যাটফর্মের কর্মক্ষমতা অপ্টিমাইজ করতে Android 15 16 KB মেমরি পৃষ্ঠাগুলির জন্য সমর্থন চালু করেছে। Android 16 একটি সামঞ্জস্যপূর্ণ মোড যোগ করে, যা 4 KB মেমরি পৃষ্ঠাগুলির জন্য নির্মিত কিছু অ্যাপকে 16 KB মেমরি পৃষ্ঠাগুলির জন্য কনফিগার করা ডিভাইসে চালানোর অনুমতি দেয়।

যখন আপনার অ্যাপ Android 16 বা তার উচ্চতর সংস্করণের কোনো ডিভাইসে চলছে, যদি Android শনাক্ত করে যে আপনার অ্যাপে 4 KB সারিবদ্ধ মেমরি পৃষ্ঠা রয়েছে, তাহলে এটি স্বয়ংক্রিয়ভাবে সামঞ্জস্যপূর্ণ মোড ব্যবহার করে এবং ব্যবহারকারীর কাছে একটি বিজ্ঞপ্তি ডায়ালগ প্রদর্শন করে। পিছনের দিকের সামঞ্জস্য মোড সক্ষম করতে AndroidManifest.xmlandroid:pageSizeCompat বৈশিষ্ট্য সেট করা আপনার অ্যাপ চালু হওয়ার সময় ডায়ালগ প্রদর্শনকে বাধা দেবে৷ android:pageSizeCompat প্রপার্টি ব্যবহার করতে, Android 16 SDK ব্যবহার করে আপনার অ্যাপ কম্পাইল করুন।

সর্বোত্তম কর্মক্ষমতা, নির্ভরযোগ্যতা এবং স্থিতিশীলতার জন্য, আপনার অ্যাপটি এখনও 16 KB সারিবদ্ধ হওয়া উচিত। আরও বিশদ বিবরণের জন্য 16 KB মেমরি পৃষ্ঠাগুলিকে সমর্থন করার জন্য আপনার অ্যাপগুলি আপডেট করার বিষয়ে আমাদের সাম্প্রতিক ব্লগ পোস্টটি দেখুন৷

কম্প্যাটিবিলিটি মোড ডায়ালগ যা প্রদর্শন করে যখন সিস্টেম শনাক্ত করে যে 16 KB সারিবদ্ধ হলে একটি 4 KB-সারিবদ্ধ অ্যাপ আরও ভালোভাবে চলতে পারে।

ব্যবহারকারীর অভিজ্ঞতা এবং সিস্টেম UI

অ্যান্ড্রয়েড ১৬ (এপিআই লেভেল ৩৬) এ নিম্নলিখিত পরিবর্তনগুলি অন্তর্ভুক্ত রয়েছে যা আরও সামঞ্জস্যপূর্ণ, স্বজ্ঞাত ব্যবহারকারীর অভিজ্ঞতা তৈরি করার উদ্দেশ্যে করা হয়েছে।

বিঘ্নিত অ্যাক্সেসিবিলিটি ঘোষণাগুলিকে অবমূল্যায়ন করা

Android 16 অ্যাকসেসিবিলিটি ঘোষণাগুলিকে বাতিল করে, যা announceForAccessibility ব্যবহার বা TYPE_ANNOUNCEMENT অ্যাক্সেসিবিলিটি ইভেন্টগুলির প্রেরণের দ্বারা চিহ্নিত৷ এগুলি টকব্যাক এবং অ্যান্ড্রয়েডের স্ক্রিন রিডার ব্যবহারকারীদের জন্য অসামঞ্জস্যপূর্ণ ব্যবহারকারীর অভিজ্ঞতা তৈরি করতে পারে এবং বিকল্পগুলি Android এর বিভিন্ন সহায়ক প্রযুক্তি জুড়ে ব্যবহারকারীর চাহিদার বিস্তৃত পরিসরকে আরও ভালভাবে পরিবেশন করে৷

বিকল্পের উদাহরণ:

অপ্রচলিত announceForAccessibility API-এর রেফারেন্স ডকুমেন্টেশনে প্রস্তাবিত বিকল্পগুলি সম্পর্কে আরও বিশদ অন্তর্ভুক্ত রয়েছে৷

৩-বোতাম নেভিগেশনের জন্য সমর্থন

Android 16 সঠিকভাবে ভবিষ্যদ্বাণীমূলক ব্যাক-এ স্থানান্তরিত অ্যাপগুলির জন্য 3-বোতাম নেভিগেশনে ভবিষ্যদ্বাণীমূলক ব্যাক সমর্থন নিয়ে আসে। পিছনের বোতামটি দীর্ঘক্ষণ চাপলে একটি ভবিষ্যদ্বাণীমূলক ব্যাক অ্যানিমেশন শুরু হয়, যা আপনাকে পিছনের সোয়াইপ আপনাকে কোথায় নিয়ে যায় তার একটি পূর্বরূপ দেয়।

এই আচরণটি সিস্টেমের সমস্ত ক্ষেত্র জুড়ে প্রযোজ্য যা ভবিষ্যদ্বাণীমূলক ব্যাক অ্যানিমেশনগুলিকে সমর্থন করে, যার মধ্যে সিস্টেম অ্যানিমেশনগুলি (ব্যাক-টু-হোম, ক্রস-টাস্ক, এবং ক্রস-অ্যাক্টিভিটি) সহ।

3-বোতাম নেভিগেশন মোডে ভবিষ্যদ্বাণীমূলক ব্যাক অ্যানিমেশন।

স্বয়ংক্রিয় থিমযুক্ত অ্যাপ আইকন

Beginning with Android 16 QPR 2, Android automatically applies themes to app icons to create a cohesive home screen experience. This occurs if an app does not provide its own themed app icon. Apps can control the design of their themed app icon by including a monochrome layer within their adaptive icon and previewing what their app icon will look like in Android Studio.

ডিভাইস ফর্ম ফ্যাক্টর

ভার্চুয়াল ডিভাইস মালিকদের দ্বারা ডিসপ্লেতে প্রজেক্ট করা হলে অ্যান্ড্রয়েড ১৬ (এপিআই লেভেল ৩৬) অ্যাপগুলির জন্য নিম্নলিখিত পরিবর্তনগুলি অন্তর্ভুক্ত করে।

ভার্চুয়াল ডিভাইসের মালিক ওভাররাইড করে

A virtual device owner is a trusted or privileged app that creates and manages a virtual device. Virtual device owners run apps on a virtual device and then project the apps to the display of a remote device, such as a personal computer, virtual reality device, or car infotainment system. The virtual device owner is on a local device, such as a mobile phone.

Virtual device owner on phone creates virtual device that projects app to remote display.

Per-app overrides

On devices running Android 16 (API level 36), virtual device owners can override app settings on select virtual devices that the virtual device owners manage. For example, to improve app layout, a virtual device owner can ignore orientation, aspect ratio, and resizability restrictions when projecting apps onto an external display.

Common breaking changes

The Android 16 behavior might impact your app's UI on large screen form factors such as car displays or Chromebooks, especially layouts that were designed for small displays in portrait orientation. To learn how to make your app adaptive for all device form factors, see About adaptive layouts.

References

Companion app streaming

নিরাপত্তা

অ্যান্ড্রয়েড ১৬ (এপিআই লেভেল ৩৬) এ এমন পরিবর্তন রয়েছে যা সিস্টেম নিরাপত্তাকে উৎসাহিত করে অ্যাপ এবং ব্যবহারকারীদের ক্ষতিকারক অ্যাপ থেকে রক্ষা করতে সাহায্য করে।

ইন্টেন্ট রিডাইরেকশন আক্রমণের বিরুদ্ধে উন্নত নিরাপত্তা

Android 16 provides default security against general Intent redirection attacks, with minimum compatibility and developer changes required.

We are introducing by-default security hardening solutions to Intent redirection exploits. In most cases, apps that use intents normally won't experience any compatibility issues; we've gathered metrics throughout our development process to monitor which apps might experience breakages.

Intent redirection in Android occurs when an attacker can partly or fully control the contents of an intent used to launch a new component in the context of a vulnerable app, while the victim app launches an untrusted sub-level intent in an extras field of an ("top-level") Intent. This can lead to the attacker app launching private components in the context of the victim app, triggering privileged actions, or gaining URI access to sensitive data, potentially leading to data theft and arbitrary code execution.

Opt out of Intent redirection handling

Android 16 introduces a new API that allows apps to opt out of launch security protections. This might be necessary in specific cases where the default security behavior interferes with legitimate app use cases.

For applications compiling against Android 16 (API level 36) SDK or higher

You can directly use the removeLaunchSecurityProtection() method on the Intent object.

val i = intent
val iSublevel: Intent? = i.getParcelableExtra("sub_intent")
iSublevel?.removeLaunchSecurityProtection() // Opt out from hardening
iSublevel?.let { startActivity(it) }
For applications compiling against Android 15 (API level 35) or lower

While not recommended, you can use reflection to access the removeLaunchSecurityProtection() method.

val i = intent
val iSublevel: Intent? = i.getParcelableExtra("sub_intent", Intent::class.java)
try {
    val removeLaunchSecurityProtection = Intent::class.java.getDeclaredMethod("removeLaunchSecurityProtection")
    removeLaunchSecurityProtection.invoke(iSublevel)
} catch (e: Exception) {
    // Handle the exception, e.g., log it
} // Opt-out from the security hardening using reflection
iSublevel?.let { startActivity(it) }

কম্প্যানিয়ন অ্যাপগুলিকে আর আবিষ্কারের সময়সীমা সম্পর্কে অবহিত করা হবে না

Android 16 introduces a new behavior during companion device pairing flow to protect the user's location privacy from malicious apps. All companion apps running on Android 16 are no longer directly notified of discovery timeout using RESULT_DISCOVERY_TIMEOUT. Instead, the user is notified of timeout events with a visual dialog. When the user dismisses the dialog, the app is alerted of the association failure with RESULT_USER_REJECTED.

The search duration has also been extended from the original 20 seconds, and the device discovery can be stopped by the user at any point during the search. If at least one device was discovered within the first 20 seconds of starting the search, the CDM stops searching for additional devices.

সংযোগ

পেরিফেরাল ডিভাইসের সাথে সংযোগ উন্নত করতে অ্যান্ড্রয়েড ১৬ (এপিআই লেভেল ৩৬) ব্লুটুথ স্ট্যাকে নিম্নলিখিত পরিবর্তনগুলি অন্তর্ভুক্ত করে।

উন্নত বন্ড ক্ষতি ব্যবস্থাপনা

Starting in Android 16, the Bluetooth stack has been updated to improve security and user experience when a remote bond loss is detected. Previously, the system would automatically remove the bond and initiate a new pairing process, which could lead to unintentional re-pairing. We have seen in many instances apps not taking care of the bond loss event in a consistent way.

To unify the experience, Android 16 improved the bond loss handling to the system. If a previously bonded Bluetooth device could not be authenticated upon reconnection, the system will disconnect the link, retain local bond information, and display a system dialog informing users of the bond loss and directing them to re-pair.