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

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

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

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

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

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

Starting in Android 16, we're adjusting regular and expedited job execution runtime quota based on the following factors:

  • Which app standby bucket the application is in: in Android 16, active standby buckets will start being enforced by a generous runtime quota.
  • If the job starts execution while the app is in a top state: in Android 16, Jobs started while the app is visible to the user and continues after the app becomes invisible, will adhere to the job runtime quota.
  • If the job is executing while running a Foreground Service: in Android 16, jobs that are executing concurrently with a foreground service will adhere to the job runtime quota. If you're leveraging jobs for user initiated data transfer, consider using user initiated data transfer jobs instead.

This change impacts tasks scheduled using WorkManager, JobScheduler, and DownloadManager. To debug why a job was stopped, we recommend logging why your job was stopped by calling WorkInfo.getStopReason() (for JobScheduler jobs, call JobParameters.getStopReason()).

For information about how your app's state affects the resources it can use, see Power management resource limits. For more information on battery-optimal best practices, refer to guidance on optimize battery use for task scheduling APIs.

We also recommend leveraging the new JobScheduler#getPendingJobReasonsHistory API introduced in Android 16 to understand why a job has not executed.

Testing

To test your app's behavior, you can enable override of certain job quota optimizations as long as the app is running on an Android 16 device.

To disable enforcement of "top state will adhere to job runtime quota", run the following adb command:

adb shell am compat enable OVERRIDE_QUOTA_ENFORCEMENT_TO_TOP_STARTED_JOBS APP_PACKAGE_NAME

To disable enforcement of "jobs that are executing while concurrently with a foreground service will adhere to the job runtime quota", run the following adb command:

adb shell am compat enable OVERRIDE_QUOTA_ENFORCEMENT_TO_FGS_JOBS APP_PACKAGE_NAME

To test certain app standby bucket behavior, you can set the app standby bucket of your app using the following adb command:

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

To understand the app standby bucket your app is in, you can get the app standby bucket of your app using the following adb command:

adb shell am get-standby-bucket APP_PACKAGE_NAME

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

একটি পরিত্যক্ত কাজ ঘটে যখন কাজের সাথে যুক্ত JobParameters অবজেক্টটি আবর্জনা সংগ্রহ করা হয়, কিন্তু JobService#jobFinished(JobParameters, boolean) কাজ সমাপ্তির সংকেত দিতে ডাকা হয়নি। এটি ইঙ্গিত দেয় যে অ্যাপের সচেতনতা ছাড়াই চাকরিটি চলমান এবং পুনঃনির্ধারিত হতে পারে।

যে অ্যাপগুলি JobScheduler-এর উপর নির্ভর করে, JobParameters অবজেক্টের একটি শক্তিশালী রেফারেন্স বজায় রাখে না এবং টাইমআউট এখন STOP_REASON_TIMEOUT পরিবর্তে নতুন চাকরি বন্ধের কারণ STOP_REASON_TIMEOUT_ABANDONED দেওয়া হবে।

নতুন পরিত্যক্ত স্টপ কারণের ঘন ঘন ঘটনা ঘটলে, সিস্টেম কাজের ফ্রিকোয়েন্সি কমাতে প্রশমনের পদক্ষেপ নেবে।

অ্যাপ্লিকেশানগুলিকে পরিত্যক্ত কাজগুলি সনাক্ত করতে এবং কমাতে নতুন স্টপ কারণ ব্যবহার করা উচিত৷

আপনি যদি WorkManager, AsyncTask, বা DownloadManager ব্যবহার করেন, তাহলে আপনি প্রভাবিত হবেন না কারণ এই APIগুলি আপনার অ্যাপের হয়ে চাকরির জীবনচক্র পরিচালনা করে।

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. আপনার আবেদন প্রক্রিয়া অন্যান্য প্রক্রিয়ার সাথে ইন্টারঅ্যাক্ট করে এবং একটি নির্দিষ্ট ক্রমে একটি সম্প্রচারের অভিপ্রায় প্রাপ্তির আশা রাখে।

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

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

অ্যান্ড্রয়েড 16 এ অ্যান্ড্রয়েড রানটাইম (এআরটি) এর সর্বশেষ আপডেটগুলি অন্তর্ভুক্ত করে যা অ্যান্ড্রয়েড রানটাইমের (এআরটি) কর্মক্ষমতা উন্নত করে এবং অতিরিক্ত জাভা বৈশিষ্ট্যগুলির জন্য সমর্থন প্রদান করে। Google Play সিস্টেম আপডেটের মাধ্যমে, এই উন্নতিগুলি Android 12 (API স্তর 31) এবং উচ্চতর চলমান এক বিলিয়নেরও বেশি ডিভাইসে উপলব্ধ।

এই পরিবর্তনগুলি প্রকাশিত হওয়ার সাথে সাথে, ART-এর অভ্যন্তরীণ কাঠামোর উপর নির্ভর করে এমন লাইব্রেরি এবং অ্যাপ কোডগুলি Android 16 চালিত ডিভাইসগুলিতে সঠিকভাবে কাজ নাও করতে পারে, সেই সাথে আগের Android সংস্করণগুলি যা Google Play সিস্টেম আপডেটের মাধ্যমে ART মডিউল আপডেট করে।

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

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

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

প্ল্যাটফর্মের কর্মক্ষমতা অপ্টিমাইজ করতে 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-বোতাম নেভিগেশন মোডে ভবিষ্যদ্বাণীমূলক ব্যাক অ্যানিমেশন।

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

Android 16 QPR 2 দিয়ে শুরু করে, Android স্বয়ংক্রিয়ভাবে অ্যাপ আইকনগুলিতে থিম প্রয়োগ করে একটি সমন্বিত হোম স্ক্রীন অভিজ্ঞতা তৈরি করে৷ এটি ঘটে যদি একটি অ্যাপ তার নিজস্ব থিমযুক্ত অ্যাপ আইকন প্রদান না করে। অ্যাপ্লিকেশানগুলি তাদের অভিযোজিত আইকনের মধ্যে একটি মনোক্রোম স্তর অন্তর্ভুক্ত করে এবং Android স্টুডিওতে তাদের অ্যাপ আইকনটি কেমন হবে তা পূর্বরূপ দেখার মাধ্যমে তাদের থিমযুক্ত অ্যাপ আইকনের নকশা নিয়ন্ত্রণ করতে পারে৷

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

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

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

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.