অ্যান্ড্রয়েড ১৭ ডেভেলপারদের জন্য দারুণ কিছু নতুন ফিচার এবং এপিআই নিয়ে এসেছে। নিচের বিভাগগুলোতে এই ফিচারগুলোর সংক্ষিপ্ত বিবরণ দেওয়া হলো, যা আপনাকে সংশ্লিষ্ট এপিআইগুলো ব্যবহার শুরু করতে সাহায্য করবে।
নতুন, পরিবর্তিত এবং অপসারিত API-গুলির বিস্তারিত তালিকার জন্য API diff report পড়ুন। নতুন API-গুলির বিশদ বিবরণের জন্য Android API reference দেখুন — নতুন API-গুলি সহজে চোখে পড়ার জন্য হাইলাইট করা থাকে।
প্ল্যাটফর্মের পরিবর্তন আপনার অ্যাপগুলোকে প্রভাবিত করতে পারে এমন ক্ষেত্রগুলোও পর্যালোচনা করা উচিত। আরও তথ্যের জন্য, নিম্নলিখিত পৃষ্ঠাগুলো দেখুন:
- অ্যান্ড্রয়েড ১৭ টার্গেট করা হলে অ্যাপগুলোর আচরণে যে পরিবর্তনগুলো আসবে
- আচরণগত পরিবর্তন যা
targetSdkVersionনির্বিশেষে সমস্ত অ্যাপকে প্রভাবিত করে ।
মূল কার্যকারিতা
অ্যান্ড্রয়েড ১৭-এ অ্যান্ড্রয়েডের মূল কার্যকারিতা সম্পর্কিত নিম্নলিখিত নতুন বৈশিষ্ট্যগুলো যুক্ত করা হয়েছে।
নতুন প্রোফাইলিংম্যানেজার ট্রিগার
Android 17 adds several new system triggers to ProfilingManager to
help you collect in-depth data to debug performance issues.
The new triggers are:
TRIGGER_TYPE_COLD_START: Trigger occurs during app cold start. It provides both a call stack sample and a system trace in the response.TRIGGER_TYPE_OOM: Trigger occurs when an app throws anOutOfMemoryErrorand provides a Java Heap Dump in response.TRIGGER_TYPE_KILL_EXCESSIVE_CPU_USAGE: Trigger occurs when an app is killed due to abnormal and excessive CPU usage and provides a call stack sample in response.
To understand how to set up the system trigger, see the documentation on trigger-based profiling and how to retrieve and analyze profiling data documentation.
জবডিবাগইনফো এপিআই
Android 17 introduces new JobDebugInfo APIs to help developers debug
their JobScheduler jobs--why they aren't running, how long they ran for, and
other aggregated information.
The first method of the expanded JobDebugInfo APIs is
getPendingJobReasonStats(), which returns a map of reasons why the job was in
a pending execution state and their respective cumulative pending
durations. This method joins the getPendingJobReasonsHistory() and
getPendingJobReasons() methods to give you insight into why a scheduled
job is not running as expected, but simplifies information retrieval by making
both duration and job reason available in a single method.
For example, for a specified jobId, the method might return
PENDING_JOB_REASON_CONSTRAINT_CHARGING and a duration of 60000 ms, indicating
the job was pending for 60000ms due to the charging constraint not being
satisfied.
allow-while-idle অ্যালার্মের জন্য লিসেনার সাপোর্টের মাধ্যমে ওয়েক লক হ্রাস করুন।
Android 17
introduces a new variant of AlarmManager.setExactAndAllowWhileIdle that
accepts an OnAlarmListener instead of a PendingIntent. This new
callback-based mechanism is ideal for apps that currently rely on continuous
wakelocks to perform periodic tasks, such as messaging apps maintaining socket
connections.
গোপনীয়তা
ব্যবহারকারীর গোপনীয়তা উন্নত করার জন্য অ্যান্ড্রয়েড ১৭-এ নিম্নলিখিত নতুন বৈশিষ্ট্যগুলো অন্তর্ভুক্ত করা হয়েছে।
এনক্রিপ্টেড ক্লায়েন্ট হ্যালো (ECH) প্ল্যাটফর্ম সমর্থন
Android 17 introduces platform support for Encrypted Client Hello (ECH), a significant privacy enhancement for network communications. ECH is a TLS 1.3 extension that encrypts the Server Name Indication (SNI) during the initial TLS handshake. This encryption helps protect user privacy by making it more difficult for network intermediaries to identify the specific domain an app is connecting to.
The platform now includes the necessary APIs for networking libraries to
implement ECH. This includes new capabilities in DnsResolver to query for
HTTPS DNS records containing ECH configurations, and new methods in Conscrypt's
SSLEngines and SSLSockets to enable ECH by passing in these configurations when
connecting to a domain. Developers can configure ECH preferences, such as
enabling it opportunistically or mandating its use, through the new
<domainEncryption> element within the Network Security Configuration file,
applicable globally or on a per-domain basis.
Popular networking libraries such as HttpEngine, WebView, and OkHttp are expected to integrate these platform APIs in future updates, making it easier for apps to adopt ECH and enhance user privacy.
For more information, see the Encrypted Client Hello documentation.
অ্যান্ড্রয়েড কন্টাক্টস পিকার
অ্যান্ড্রয়েড কন্টাক্ট পিকার হলো একটি প্রমিত, ব্রাউজযোগ্য ইন্টারফেস, যার মাধ্যমে ব্যবহারকারীরা আপনার অ্যাপের সাথে কন্টাক্ট শেয়ার করতে পারেন। অ্যান্ড্রয়েড ১৭ (এপিআই লেভেল ৩৭) বা তার উচ্চতর সংস্করণে চালিত ডিভাইসগুলোতে উপলব্ধ এই পিকারটি, ব্যাপক READ_CONTACTS পারমিশনের একটি গোপনীয়তা-সংরক্ষক বিকল্প প্রদান করে। ব্যবহারকারীর সম্পূর্ণ অ্যাড্রেস বুকে অ্যাক্সেসের অনুরোধ করার পরিবর্তে, আপনার অ্যাপটি তার প্রয়োজনীয় ডেটা ফিল্ডগুলো, যেমন ফোন নম্বর বা ইমেল অ্যাড্রেস, নির্দিষ্ট করে দেয় এবং ব্যবহারকারী শেয়ার করার জন্য নির্দিষ্ট কন্টাক্ট নির্বাচন করেন। এটি আপনার অ্যাপকে শুধুমাত্র নির্বাচিত ডেটাতে রিড অ্যাক্সেস দেয়, যা ইউআই তৈরি বা রক্ষণাবেক্ষণ না করেই বিল্ট-ইন সার্চ, প্রোফাইল পরিবর্তন এবং একাধিক কন্টাক্ট নির্বাচনের সুবিধার মাধ্যমে একটি সামঞ্জস্যপূর্ণ ব্যবহারকারীর অভিজ্ঞতা প্রদান করে এবং এর মাধ্যমে সূক্ষ্ম নিয়ন্ত্রণ নিশ্চিত করে।
আরও তথ্যের জন্য, কন্টাক্ট পিকার ডকুমেন্টেশন দেখুন।
নিরাপত্তা
ডিভাইস ও অ্যাপের নিরাপত্তা উন্নত করতে অ্যান্ড্রয়েড ১৭ নিম্নলিখিত নতুন ফিচারগুলো যোগ করেছে।
অ্যান্ড্রয়েড অ্যাডভান্সড প্রোটেকশন মোড (AAPM)
অ্যান্ড্রয়েড অ্যাডভান্সড প্রোটেকশন মোড অ্যান্ড্রয়েড ব্যবহারকারীদের একটি শক্তিশালী নতুন নিরাপত্তা বৈশিষ্ট্য প্রদান করে, যা ব্যবহারকারীদের - বিশেষ করে যারা উচ্চ ঝুঁকিতে রয়েছে - অত্যাধুনিক আক্রমণ থেকে সুরক্ষিত করার ক্ষেত্রে একটি গুরুত্বপূর্ণ পদক্ষেপ। একটি অপ্ট-ইন বৈশিষ্ট্য হিসাবে ডিজাইন করা, AAPM একটি একক কনফিগারেশন সেটিং দিয়ে সক্রিয় করা হয়েছে যা ব্যবহারকারীরা যেকোনো সময় একটি মতামতযুক্ত নিরাপত্তা সুরক্ষা সেট প্রয়োগ করতে চালু করতে পারেন।
এই মূল কনফিগারেশনগুলির মধ্যে রয়েছে অজানা উৎস থেকে অ্যাপ ইনস্টলেশন ব্লক করা (সাইডলোডিং), USB ডেটা সিগন্যালিং সীমাবদ্ধ করা এবং Google Play Protect স্ক্যানিং বাধ্যতামূলক করা, যা ডিভাইসের আক্রমণ পৃষ্ঠের ক্ষেত্রফল উল্লেখযোগ্যভাবে হ্রাস করে। ডেভেলপাররা মোডের স্থিতি সনাক্ত করতে AdvancedProtectionManager API ব্যবহার করে এই বৈশিষ্ট্যটির সাথে একীভূত হতে পারে, যার ফলে অ্যাপ্লিকেশনগুলি স্বয়ংক্রিয়ভাবে একটি কঠোর নিরাপত্তা ভঙ্গি গ্রহণ করতে পারে বা ব্যবহারকারী যখন এটি নির্বাচন করে তখন উচ্চ-ঝুঁকিপূর্ণ কার্যকারিতা সীমাবদ্ধ করতে পারে।
PQC APK সাইনিং
Android now supports a hybrid APK signature scheme to future-proof your app's signing identity against the potential threat of attacks that make use of quantum computing. This feature introduces a new APK Signature Scheme, which lets you pair a classical signing key (such as RSA or EC) with a new post-quantum cryptography (PQC) algorithm (ML-DSA).
This hybrid approach ensures your app remains secure against future quantum attacks while maintaining full backward compatibility with older Android versions and devices that rely on classical signature verification.
Impact on developers
- Apps using Play App Signing: If you use Play App Signing, you can wait for Google Play to give you the option to upgrade a hybrid signature using a PQC key generated by Google Play, ensuring your app is protected without requiring manual key management.
- Apps using self-managed keys: Developers who manage their own signing keys can utilize updated Android build tools (like apksigner) to rotate to a hybrid identity, combining a PQC key with a new classical key. (You must create a new classical key, you cannot reuse the older one.)
সংযোগ
ডিভাইস ও অ্যাপের সংযোগ উন্নত করতে অ্যান্ড্রয়েড ১৭ নিম্নলিখিত বৈশিষ্ট্যগুলো যোগ করেছে।
সীমাবদ্ধ স্যাটেলাইট নেটওয়ার্ক
কম-ব্যান্ডউইথ স্যাটেলাইট নেটওয়ার্কগুলিতে অ্যাপগুলিকে কার্যকরভাবে কাজ করতে সক্ষম করার জন্য অপ্টিমাইজেশন বাস্তবায়ন করে।
ব্যবহারকারীর অভিজ্ঞতা এবং সিস্টেম UI
ব্যবহারকারীর অভিজ্ঞতা উন্নত করার জন্য অ্যান্ড্রয়েড ১৭-এ নিম্নলিখিত পরিবর্তনগুলো অন্তর্ভুক্ত করা হয়েছে।
নিবেদিত সহকারী ভলিউম স্ট্রিম
Android 17 introduces a dedicated Assistant volume stream for Assistant apps,
for playback with USAGE_ASSISTANT. This change decouples Assistant audio
from the standard media stream, providing users with isolated control over both
volumes. This enables scenarios such as muting media playback while maintaining
audibility for Assistant responses, and the other way around.
Assistant apps with access to the new MODE_ASSISTANT_CONVERSATION audio
mode can further improve the volume control consistency. Assistant apps can use
this mode to provide a hint to the system about an active Assistant session,
ensuring the Assistant stream can be controlled outside of the active
USAGE_ASSISTANT playback or with connected Bluetooth peripherals.
হস্তান্তর
Handoff is a new feature and API coming to Android 17 that app developers can integrate with to provide cross-device continuity for their users. It allows the user to start an app activity on one Android device and transition it to another Android device. Handoff runs in the background of a user's device and surfaces available activities from the user's other nearby devices through various entry points, like the launcher and taskbar, on the receiving device.
Apps can designate Handoff to launch the same native Android app, if it is installed and available on the receiving device. In this app-to-app flow, the user is deep-linked to the designated activity. Alternatively, app-to-web Handoff can be offered as a fallback option or directly implemented with URL Handoff.
Handoff support is implemented on a per-activity basis. To enable Handoff, call
the setHandoffEnabled() method for the activity. Additional data may need to
be passed along with the handoff so the recreated activity on the receiving
device can restore appropriate state. Implement the
onHandoffActivityRequested() callback to return a HandoffActivityData object
which contains details that specify how Handoff should handle and recreate
the activity on the receiving device.
লাইভ আপডেট - সিমান্টিক কালার এপিআই
অ্যান্ড্রয়েড ১৭ এর সাথে, লাইভ আপডেট সার্বজনীন অর্থ সহ রঙগুলিকে সমর্থন করার জন্য সিমান্টিক কালারিং এপিআই চালু করেছে।
নিম্নলিখিত ক্লাসগুলি শব্দার্থিক রঙ সমর্থন করে:
-
Notification -
Notification.Metric -
Notification.ProgressStyle.Point -
Notification.ProgressStyle.Segment
রঙ করা
- সবুজ : নিরাপত্তার সাথে সম্পর্কিত। এই রঙটি সেই ক্ষেত্রে ব্যবহার করা উচিত যেখানে এটি মানুষকে জানাবে যে আপনি নিরাপদ পরিস্থিতিতে আছেন।
- কমলা : সতর্কতা নির্ধারণ এবং শারীরিক বিপদ চিহ্নিত করার জন্য। এই রঙটি এমন পরিস্থিতিতে ব্যবহার করা উচিত যেখানে ব্যবহারকারীদের আরও ভাল সুরক্ষা সেটিং সেট করার দিকে মনোযোগ দিতে হবে।
- লাল : সাধারণত বিপদ নির্দেশ করে, থামো। এটি এমন ক্ষেত্রে উপস্থাপন করা উচিত যেখানে মানুষের জরুরি মনোযোগের প্রয়োজন।
- নীল : তথ্যবহুল এবং অন্যান্য কন্টেন্ট থেকে আলাদা করে দেখানোর জন্য নিরপেক্ষ রঙ।
নিম্নলিখিত উদাহরণে একটি বিজ্ঞপ্তিতে টেক্সটে শব্দার্থিক শৈলী কীভাবে প্রয়োগ করতে হয় তা দেখানো হয়েছে:
val ssb = SpannableStringBuilder()
.append("Colors: ")
.append("NONE", Notification.createSemanticStyleAnnotation(SEMANTIC_STYLE_UNSPECIFIED), 0)
.append(", ")
.append("INFO", Notification.createSemanticStyleAnnotation(SEMANTIC_STYLE_INFO), 0)
.append(", ")
.append("SAFE", Notification.createSemanticStyleAnnotation(SEMANTIC_STYLE_SAFE), 0)
.append(", ")
.append("CAUTION", Notification.createSemanticStyleAnnotation(SEMANTIC_STYLE_CAUTION), 0)
.append(", ")
.append("DANGER", Notification.createSemanticStyleAnnotation(SEMANTIC_STYLE_DANGER), 0)
Notification.Builder(context, channelId)
.setSmallIcon(R.drawable.ic_icon)
.setContentTitle("Hello World!")
.setContentText(ssb)
.setOngoing(true)
.setRequestPromotedOngoing(true)
অ্যান্ড্রয়েড ১৭ এর জন্য UWB ডাউনলিঙ্ক-TDoA এপিআই
ডাউনলিংক আগমনের সময়ের পার্থক্য (DL-TDoA) রেঞ্জিং একটি ডিভাইসকে সংকেতের আপেক্ষিক আগমনের সময় পরিমাপ করে একাধিক অ্যাঙ্করের সাপেক্ষে তার অবস্থান নির্ধারণ করতে দেয়।
নিম্নলিখিত স্নিপেটটি দেখায় কিভাবে Ranging Manager শুরু করতে হয়, ডিভাইসের ক্ষমতা যাচাই করতে হয় এবং একটি DL-TDoA সেশন শুরু করতে হয়:
কোটলিন
class RangingApp {
fun initDlTdoa(context: Context) {
// Initialize the Ranging Manager
val rangingManager = context.getSystemService(RangingManager::class.java)
// Register for device capabilities
val capabilitiesCallback = object : RangingManager.CapabilitiesCallback {
override fun onRangingCapabilities(capabilities: RangingCapabilities) {
// Make sure Dl-TDoA is supported before starting the session
if (capabilities.uwbCapabilities != null && capabilities.uwbCapabilities!!.isDlTdoaSupported) {
startDlTDoASession(context)
}
}
}
rangingManager.registerCapabilitiesCallback(Executors.newSingleThreadExecutor(), capabilitiesCallback)
}
fun startDlTDoASession(context: Context) {
// Initialize the Ranging Manager
val rangingManager = context.getSystemService(RangingManager::class.java)
// Create session and configure parameters
val executor = Executors.newSingleThreadExecutor()
val rangingSession = rangingManager.createRangingSession(executor, RangingSessionCallback())
val rangingRoundIndexes = intArrayOf(0)
val config: ByteArray = byteArrayOf() // OOB config data
val params = DlTdoaRangingParams.createFromFiraConfigPacket(config, rangingRoundIndexes)
val rangingDevice = RangingDevice.Builder().build()
val rawTagDevice = RawRangingDevice.Builder()
.setRangingDevice(rangingDevice)
.setDlTdoaRangingParams(params)
.build()
val dtTagConfig = RawDtTagRangingConfig.Builder(rawTagDevice).build()
val preference = RangingPreference.Builder(DEVICE_ROLE_DT_TAG, dtTagConfig)
.setSessionConfig(SessionConfig.Builder().build())
.build()
// Start the ranging session
rangingSession.start(preference)
}
}
private class RangingSessionCallback : RangingSession.Callback {
override fun onDlTdoaResults(peer: RangingDevice, measurement: DlTdoaMeasurement) {
// Process measurement results here
}
}
জাভা
public class RangingApp {
public void initDlTdoa(Context context) {
// Initialize the Ranging Manager
RangingManager rangingManager = context.getSystemService(RangingManager.class);
// Register for device capabilities
RangingManager.CapabilitiesCallback capabilitiesCallback = new RangingManager.CapabilitiesCallback() {
@Override
public void onRangingCapabilities(RangingCapabilities capabilities) {
// Make sure Dl-TDoA is supported before starting the session
if (capabilities.getUwbCapabilities() != null && capabilities.getUwbCapabilities().isDlTdoaSupported) {
startDlTDoASession(context);
}
}
};
rangingManager.registerCapabilitiesCallback(Executors.newSingleThreadExecutor(), capabilitiesCallback);
}
public void startDlTDoASession(Context context) {
RangingManager rangingManager = context.getSystemService(RangingManager.class);
// Create session and configure parameters
Executor executor = Executors.newSingleThreadExecutor();
RangingSession rangingSession = rangingManager.createRangingSession(executor, new RangingSessionCallback());
int[] rangingRoundIndexes = new int[] {0};
byte[] config = new byte[0]; // OOB config data
DlTdoaRangingParams params = DlTdoaRangingParams.createFromFiraConfigPacket(config, rangingRoundIndexes);
RangingDevice rangingDevice = new RangingDevice.Builder().build();
RawRangingDevice rawTagDevice = new RawRangingDevice.Builder()
.setRangingDevice(rangingDevice)
.setDlTdoaRangingParams(params)
.build();
RawDtTagRangingConfig dtTagConfig = new RawDtTagRangingConfig.Builder(rawTagDevice).build();
RangingPreference preference = new RangingPreference.Builder(DEVICE_ROLE_DT_TAG, dtTagConfig)
.setSessionConfig(new SessionConfig.Builder().build())
.build();
// Start the ranging session
rangingSession.start(preference);
}
private static class RangingSessionCallback implements RangingSession.Callback {
@Override
public void onDlTdoaResults(RangingDevice peer, DlTdoaMeasurement measurement) {
// Process measurement results here
}
}
}
আউট-অফ-ব্যান্ড (OOB) কনফিগারেশন
নিম্নলিখিত স্নিপেটটি Wi-Fi এবং BLE এর জন্য DL-TDoA OOB কনফিগারেশন ডেটার একটি উদাহরণ প্রদান করে:
জাভা
// Wifi Configuration
byte[] wifiConfig = {
(byte) 0xDD, (byte) 0x2D, (byte) 0x5A, (byte) 0x18, (byte) 0xFF, // Header
(byte) 0x5F, (byte) 0x19, // FiRa Sub-Element
(byte) 0x02, (byte) 0x00, // Profile ID
(byte) 0x06, (byte) 0x02, (byte) 0x20, (byte) 0x08, // MAC Address
(byte) 0x14, (byte) 0x01, (byte) 0x0C, // Preamble Index
(byte) 0x27, (byte) 0x02, (byte) 0x08, (byte) 0x07, // Vendor ID
(byte) 0x28, (byte) 0x06, (byte) 0xCA, (byte) 0xC8, (byte) 0xA6, (byte) 0xF7, (byte) 0x6F, (byte) 0x08, // Static STS IV
(byte) 0x08, (byte) 0x02, (byte) 0x60, (byte) 0x09, // Slot Duration
(byte) 0x1B, (byte) 0x01, (byte) 0x0A, // Slots per RR
(byte) 0x09, (byte) 0x04, (byte) 0xE8, (byte) 0x03, (byte) 0x00, (byte) 0x00, // Duration
(byte) 0x9F, (byte) 0x04, (byte) 0x67, (byte) 0x45, (byte) 0x23, (byte) 0x01 // Session ID
};
// BLE Configuration
byte[] bleConfig = {
(byte) 0x2D, (byte) 0x16, (byte) 0xF4, (byte) 0xFF, // Header
(byte) 0x5F, (byte) 0x19, // FiRa Sub-Element
(byte) 0x02, (byte) 0x00, // Profile ID
(byte) 0x06, (byte) 0x02, (byte) 0x20, (byte) 0x08, // MAC Address
(byte) 0x14, (byte) 0x01, (byte) 0x0C, // Preamble Index
(byte) 0x27, (byte) 0x02, (byte) 0x08, (byte) 0x07, // Vendor ID
(byte) 0x28, (byte) 0x06, (byte) 0xCA, (byte) 0xC8, (byte) 0xA6, (byte) 0xF7, (byte) 0x6F, (byte) 0x08, // Static STS IV
(byte) 0x08, (byte) 0x02, (byte) 0x60, (byte) 0x09, // Slot Duration
(byte) 0x1B, (byte) 0x01, (byte) 0x0A, // Slots per RR
(byte) 0x09, (byte) 0x04, (byte) 0xE8, (byte) 0x03, (byte) 0x00, (byte) 0x00, // Duration
(byte) 0x9F, (byte) 0x04, (byte) 0x67, (byte) 0x45, (byte) 0x23, (byte) 0x01 // Session ID
};
যদি আপনি OOB কনফিগারেশন ব্যবহার করতে না পারেন কারণ এটি অনুপস্থিত, অথবা যদি আপনাকে OOB কনফিগারেশনে নেই এমন ডিফল্ট মান পরিবর্তন করতে হয়, তাহলে আপনি নিম্নলিখিত স্নিপেটে দেখানো DlTdoaRangingParams.Builder দিয়ে প্যারামিটার তৈরি করতে পারেন। আপনি DlTdoaRangingParams.createFromFiraConfigPacket() এর পরিবর্তে এই প্যারামিটারগুলি ব্যবহার করতে পারেন:
কোটলিন
val dlTdoaParams = DlTdoaRangingParams.Builder(1)
.setComplexChannel(UwbComplexChannel.Builder()
.setChannel(9).setPreambleIndex(10).build())
.setDeviceAddress(deviceAddress)
.setSessionKeyInfo(byteArrayOf(0x01, 0x02, 0x03, 0x04))
.setRangingIntervalMillis(240)
.setSlotDuration(UwbRangingParams.DURATION_2_MS)
.setSlotsPerRangingRound(20)
.setRangingRoundIndexes(byteArrayOf(0x01, 0x05))
.build()
জাভা
DlTdoaRangingParams dlTdoaParams = new DlTdoaRangingParams.Builder(1)
.setComplexChannel(new UwbComplexChannel.Builder()
.setChannel(9).setPreambleIndex(10).build())
.setDeviceAddress(deviceAddress)
.setSessionKeyInfo(new byte[]{0x01, 0x02, 0x03, 0x04})
.setRangingIntervalMillis(240)
.setSlotDuration(UwbRangingParams.DURATION_2_MS)
.setSlotsPerRangingRound(20)
.setRangingRoundIndexes(new byte[]{0x01, 0x05})
.build();