Android 16 में, डेवलपर के लिए कई नई सुविधाएं और एपीआई उपलब्ध कराए गए हैं. यहां दिए गए सेक्शन में, इन सुविधाओं के बारे में खास जानकारी दी गई है. इससे आपको इनसे जुड़े एपीआई का इस्तेमाल शुरू करने में मदद मिलेगी.
नए, बदले गए, और हटाए गए एपीआई की पूरी सूची देखने के लिए, एपीआई में अंतर दिखाने वाली रिपोर्ट पढ़ें. नए एपीआई के बारे में ज़्यादा जानने के लिए, Android API रेफ़रंस पर जाएं. नए एपीआई को हाइलाइट किया गया है, ताकि वे आसानी से दिख सकें.आपको उन क्षेत्रों की भी समीक्षा करनी चाहिए जहां प्लैटफ़ॉर्म में हुए बदलावों से आपके ऐप्लिकेशन पर असर पड़ सकता है. ज़्यादा जानकारी के लिए, ये पेज देखें:
- Android 16 को टारगेट करने वाले ऐप्लिकेशन पर असर डालने वाले बदलाव
- ऐसे बदलाव जो
targetSdkVersionके बावजूद, सभी ऐप्लिकेशन पर असर डालते हैं.
मुख्य फ़ंक्शन
Android में नए एपीआई शामिल किए गए हैं. इनसे Android सिस्टम की मुख्य क्षमताओं को बढ़ाया जा सकता है.
साल 2025 में Android के दो एपीआई रिलीज़ किए जाएंगे
- यह झलक, Android के अगले मेजर वर्शन के लिए है. इसे 2025 की दूसरी तिमाही में लॉन्च किया जाएगा. यह रिलीज़, एपीआई की पिछली सभी रिलीज़ से मिलती-जुलती है. इसमें, व्यवहार में ऐसे बदलाव किए जा सकते हैं जो अक्सर targetSdkVersion से जुड़े होते हैं.
- हम मेजर रिलीज़ को एक तिमाही पहले रिलीज़ करने जा रहे हैं. पिछले सालों में, यह रिलीज़ तीसरी तिमाही में होती थी, लेकिन अब इसे दूसरी तिमाही में रिलीज़ किया जाएगा. ऐसा इसलिए किया जा रहा है, ताकि हमारे पूरे नेटवर्क में डिवाइस लॉन्च करने के शेड्यूल के साथ बेहतर तरीके से अलाइन किया जा सके. इससे ज़्यादा डिवाइसों पर Android का मेजर वर्शन जल्दी रिलीज़ किया जा सकेगा. साल की दूसरी तिमाही में, Android के नए वर्शन की रिलीज़ होने वाली है. इसलिए, आपको सालाना होने वाली, ऐप्लिकेशन के काम करने की जांच को पिछले सालों की तुलना में कुछ महीने पहले करना होगा. इससे यह पक्का किया जा सकेगा कि आपके ऐप्लिकेशन, नए वर्शन के साथ काम कर रहे हैं.
- हम साल 2025 की चौथी तिमाही में एक और रिलीज़ करने वाले हैं. इसमें नए डेवलपर एपीआई भी शामिल होंगे. साल 2025 में, दूसरी तिमाही में होने वाली मेजर रिलीज़ में ही, व्यवहार से जुड़े ऐसे बदलाव शामिल होंगे जिनका ऐप्लिकेशन पर असर पड़ सकता है.
चौथी तिमाही की मामूली रिलीज़ में, डेवलपर के लिए नए एपीआई के साथ-साथ, सुविधाओं के अपडेट, ऑप्टिमाइज़ेशन, और गड़बड़ियों को ठीक करने की सुविधाएं भी शामिल होंगी. हालांकि, इसमें ऐप्लिकेशन के काम करने के तरीके में कोई बदलाव नहीं किया जाएगा.
हम हर तीन महीने में Android वर्शन रिलीज़ करते रहेंगे. एपीआई रिलीज़ के बीच में, Q1 और Q3 के अपडेट से क्वालिटी को बेहतर बनाने में मदद मिलेगी. हम डिवाइस पार्टनर के साथ मिलकर, Q2 रिलीज़ को ज़्यादा से ज़्यादा डिवाइसों पर उपलब्ध कराने के लिए काम कर रहे हैं.
मुख्य और मामूली रिलीज़ के साथ नए एपीआई का इस्तेमाल करना
एपीआई लेवल की जांच करके, कोड ब्लॉक को सुरक्षित रखने के लिए, अब SDK_INT कॉन्स्टेंट के साथ VERSION_CODES का इस्तेमाल किया जाता है. यह सुविधा, Android के मुख्य वर्शन के लिए काम करती रहेगी.
if (SDK_INT >= VERSION_CODES.BAKLAVA) {
// Use APIs introduced in Android 16
}
नए SDK_INT_FULL
कंसटेंट का इस्तेमाल, एपीआई की जांच के लिए किया जा सकता है. यह जांच, नए VERSION_CODES_FULL
एन्यूमरेशन की मदद से, मेजर और माइनर, दोनों वर्शन के लिए की जा सकती है.
if (SDK_INT_FULL >= VERSION_CODES_FULL.[MAJOR or MINOR RELEASE]) {
// Use APIs introduced in a major or minor release
}
SDK टूल का सिर्फ़ मामूली वर्शन पाने के लिए, Build.getMinorSdkVersion() के तरीके का भी इस्तेमाल किया जा सकता है.
val minorSdkVersion = Build.getMinorSdkVersion(VERSION_CODES_FULL.BAKLAVA)
इन एपीआई को अभी तक फ़ाइनल नहीं किया गया है और इनमें बदलाव हो सकते हैं. इसलिए, अगर आपको कोई समस्या है, तो कृपया हमें सुझाव/राय दें या शिकायत करें.
उपयोगकर्ता अनुभव और सिस्टम यूज़र इंटरफ़ेस (यूआई)
Android 16, ऐप्लिकेशन डेवलपर और उपयोगकर्ताओं को अपनी ज़रूरतों के हिसाब से डिवाइस को कॉन्फ़िगर करने के लिए, ज़्यादा कंट्रोल और सुविधा देता है.
प्रोग्रेस से जुड़ी सूचनाएं
Android 16 में, प्रोग्रेस पर आधारित सूचनाएं देने की सुविधा जोड़ी गई है. इससे उपयोगकर्ताओं को, शुरू से लेकर आखिर तक की प्रोसेस को आसानी से ट्रैक करने में मदद मिलती है.
Notification.ProgressStyle, सूचनाओं का एक नया स्टाइल है. इसकी मदद से, प्रोग्रेस के बारे में सूचनाएं बनाई जा सकती हैं. इस्तेमाल के मुख्य उदाहरणों में, राइडशेयर, डिलीवरी, और नेविगेशन शामिल हैं. Notification.ProgressStyle
क्लास में, पॉइंट और सेगमेंट का इस्तेमाल करके, उपयोगकर्ता के सफ़र में स्टेटस और माइलस्टोन दिखाए जा सकते हैं.
To learn more, see the Progress-centric notifications documentation page.
पीछे जाने पर झलक दिखाने वाले हाथ के जेस्चर से जुड़े अपडेट
Android 16 adds new APIs to help you enable predictive back system animations in
gesture navigation such as the back-to-home animation. Registering the
onBackInvokedCallback with the new
PRIORITY_SYSTEM_NAVIGATION_OBSERVER allows your app to
receive the regular onBackInvoked call whenever the
system handles a back navigation without impacting the normal back navigation
flow.
Android 16 additionally adds the
finishAndRemoveTaskCallback() and
moveTaskToBackCallback. By registering these callbacks
with the OnBackInvokedDispatcher, the system can trigger
specific behaviors and play corresponding ahead-of-time animations when the back
gesture is invoked.
बेहतर हैप्टिक
Android ने शुरुआत से ही, हैप्टिक ऐक्चुएटर को कंट्रोल करने की सुविधा दी है.
Android 11 में, ज़्यादा जटिल हैप्टिक इफ़ेक्ट के लिए सहायता जोड़ी गई है. ये इफ़ेक्ट, डिवाइस के लिए तय किए गए सेमैंटिक प्राइमिटिव के VibrationEffect.Compositions की मदद से, ज़्यादा बेहतर ऐक्चुएटर के साथ काम कर सकते हैं.
Android 16 में हैप्टिक एपीआई जोड़े गए हैं. इनकी मदद से, ऐप्लिकेशन किसी हैप्टिक इफ़ेक्ट के ऐम्प्ल्यट्यूड और फ़्रीक्वेंसी कर्व तय कर सकते हैं. साथ ही, डिवाइस की क्षमताओं के बीच के अंतर को भी हटा सकते हैं.
डेवलपर की प्रॉडक्टिविटी और टूल
आपकी प्रॉडक्टिविटी को बेहतर बनाने के लिए, हम ज़्यादातर Android Studio, Jetpack Compose, और Android Jetpack लाइब्रेरी जैसे टूल पर काम करते हैं. हालांकि, हम हमेशा ऐसे तरीके ढूंढते रहते हैं जिनसे आपको अपने विज़न को पूरा करने में मदद मिल सके.
लाइव वॉलपेपर के लिए कॉन्टेंट हैंडलिंग
Android 16 में, लाइव वॉलपेपर फ़्रेमवर्क को एक नया कॉन्टेंट एपीआई मिल रहा है. इससे, उपयोगकर्ता के हिसाब से बदलने वाले डाइनैमिक वॉलपेपर से जुड़ी समस्याओं को हल किया जा सकेगा. फ़िलहाल, उपयोगकर्ता से मिले कॉन्टेंट को शामिल करने वाले लाइव वॉलपेपर के लिए, सेवा के हिसाब से कॉन्टेंट लागू करने की जटिल प्रक्रिया अपनानी पड़ती है. Android 16 में,
WallpaperDescription और
WallpaperInstance को शामिल किया गया है. WallpaperDescription की मदद से, एक ही सेवा के लाइव वॉलपेपर के अलग-अलग इंस्टेंस की पहचान की जा सकती है. उदाहरण के लिए, होम स्क्रीन और लॉक स्क्रीन, दोनों पर इस्तेमाल किए जा सकने वाले वॉलपेपर में, दोनों जगहों पर अलग-अलग कॉन्टेंट हो सकता है. वॉलपेपर पिकर और
WallpaperManager, इस मेटाडेटा का इस्तेमाल करके उपयोगकर्ताओं को बेहतर तरीके से वॉलपेपर दिखाते हैं. इससे, आपको अलग-अलग और पसंद के मुताबिक लाइव वॉलपेपर बनाने में मदद मिलती है.
परफ़ॉर्मेंस और बैटरी
Android 16 में ऐसे एपीआई पेश किए गए हैं जो आपके ऐप्लिकेशन के बारे में अहम जानकारी इकट्ठा करने में मदद करते हैं.
सिस्टम के ट्रिगर करने पर प्रोफ़ाइलिंग
ProfilingManager was
added in Android 15, giving apps the ability to
request profiling data collection using Perfetto on public devices in the field.
However, since this profiling must be started from the app, critical flows such
as startups or ANRs would be difficult or impossible for apps to capture.
To help with this, Android 16 introduces system-triggered profiling to
ProfilingManager. Apps can register interest in receiving traces for certain
triggers such as cold start reportFullyDrawn
or ANRs, and then the system starts and stops a trace on the app's behalf. After
the trace completes, the results are delivered to the app's data directory.
ApplicationStartInfo में कॉम्पोनेंट शुरू करें
ApplicationStartInfo was added in Android
15, allowing an app to see reasons
for process start, start type, start times, throttling, and other useful
diagnostic data. Android 16 adds
getStartComponent()
to distinguish what component type triggered the start, which can be helpful for
optimizing the startup flow of your app.
नौकरी के बारे में बेहतर जानकारी
The JobScheduler#getPendingJobReason() API returns a reason why a job
might be pending. However, a job might be pending for multiple reasons.
In Android 16, we are introducing a new API
JobScheduler#getPendingJobReasons(int jobId), which returns multiple
reasons why a job is pending, due to both explicit constraints set by the
developer and implicit constraints set by the system.
We're also introducing
JobScheduler#getPendingJobReasonsHistory(int jobId), which returns a list
of the most recent constraint changes.
We recommend using the API to help you debug why your jobs may not be executing, especially if you're seeing reduced success rates of certain tasks or have bugs around latency of certain job completion. For example, updating widgets in the background failed to occur or prefetch job failed to be called prior to app start.
This can also better help you understand if certain jobs are not completing due to system defined constraints versus explicitly set constraints.
अडैप्टिव रीफ़्रेश रेट
Android 15 में, अडैप्टिव रिफ़्रेश रेट (एआरआर) की सुविधा जोड़ी गई है. इसकी मदद से, डिसप्ले रिफ़्रेश रेट को डिवाइस के हिसाब से अडजस्ट किया जा सकता है. इसके लिए, अलग-अलग VSync चरण का इस्तेमाल करके, कॉन्टेंट के फ़्रेम रेट के हिसाब से डिसप्ले रिफ़्रेश रेट को अडजस्ट किया जाता है. इससे बिजली की खपत कम होती है. साथ ही, मोड स्विच करने की ज़रूरत भी नहीं पड़ती.
Android 16 में hasArrSupport() और
getSuggestedFrameRate(int) को शामिल किया गया है. साथ ही, getSupportedRefreshRates() को वापस लाया गया है, ताकि आपके ऐप्लिकेशन आसानी से ARR का फ़ायदा ले सकें. RecyclerView
1.4, फ़्लिंग या स्मूद स्क्रोल से सेटल होने पर, अंदरूनी तौर पर ARR के साथ काम करता है. हम ज़्यादा Jetpack लाइब्रेरी में ARR की सुविधा जोड़ने के लिए काम कर रहे हैं. फ़्रेम रेट के बारे में इस लेख में, ऐसे कई एपीआई के बारे में बताया गया है जिनका इस्तेमाल करके फ़्रेम रेट सेट किया जा सकता है. इससे आपका ऐप्लिकेशन सीधे तौर पर ARR का इस्तेमाल कर सकता है.
ADPF में हेडरूम एपीआई
SystemHealthManager में getCpuHeadroom और getGpuHeadroom एपीआई को शामिल किया गया है. इन एपीआई को गेम और ज़्यादा संसाधनों वाले ऐप्लिकेशन के लिए उपलब्ध सीपीयू और जीपीयू संसाधनों का अनुमान देने के लिए डिज़ाइन किया गया है. इन तरीकों से यह पता लगाया जा सकता है कि आपका ऐप्लिकेशन या गेम, सिस्टम की परफ़ॉर्मेंस को कैसे बेहतर बना सकता है. खास तौर पर, जब इनका इस्तेमाल Android डाइनैमिक परफ़ॉर्मेंस फ़्रेमवर्क (ADPF) के अन्य एपीआई के साथ किया जाता है, जो थर्मल ट्रिलिंग का पता लगाते हैं.
जिन डिवाइसों पर यह सुविधा काम करती है उन पर CpuHeadroomParams और
GpuHeadroomParams का इस्तेमाल करके, हेडरूम का हिसाब लगाने के लिए इस्तेमाल की जाने वाली समयावधि को पसंद के मुताबिक बनाया जा सकता है. साथ ही, संसाधन की औसत या कम से कम उपलब्धता में से किसी एक को चुना जा सकता है. इससे, सीपीयू या जीपीयू के संसाधनों के इस्तेमाल को कम करने में मदद मिल सकती है. इससे, उपयोगकर्ताओं को बेहतर अनुभव मिलता है और बैटरी लाइफ़ भी बेहतर होती है.
सुलभता
Android 16 में, ऐक्सेसिबिलिटी से जुड़े नए एपीआई और सुविधाएं जोड़ी गई हैं. इनकी मदद से, अपने ऐप्लिकेशन को हर उपयोगकर्ता तक पहुंचाया जा सकता है.
बेहतर सुलभता वाले एपीआई
Android 16 adds additional APIs to enhance UI semantics that help improve consistency for users that rely on accessibility services, such as TalkBack.
Outline text for maximum text contrast
Users with low vision often have reduced contrast sensitivity, making it challenging to distinguish objects from their backgrounds. To help these users, Android 16 introduces outline text, replacing high contrast text, which draws a larger contrasting area around text to greatly improve legibility.
Android 16 contains new AccessibilityManager APIs to let
your apps check or register a listener to
see if this mode is enabled. This is primarily for UI Toolkits like Compose to
offer a similar visual experience. If you maintain a UI Toolkit library or your
app performs custom text rendering that bypasses the
android.text.Layout class then you can use this to know
when outline text is enabled.
Duration added to TtsSpan
Android 16 extends TtsSpan with a TYPE_DURATION,
consisting of ARG_HOURS, ARG_MINUTES,
and ARG_SECONDS. This lets you directly annotate time
duration, ensuring accurate and consistent text-to-speech output with services
like TalkBack.
Support elements with multiple labels
Android currently allows UI elements to derive their accessibility label from
another, and now offers the ability for multiple labels to be associated, a
common scenario in web content. By introducing a list-based API within
AccessibilityNodeInfo, Android can directly support these
multi-label relationships. As part of this change, we've deprecated
AccessibilityNodeInfo#setLabeledBy and
#getLabeledBy in favor of
#addLabeledBy, #removeLabeledBy, and
#getLabeledByList.
Improved support for expandable elements
Android 16 adds accessibility APIs that allow you to convey the expanded or
collapsed state of interactive elements, such as menus and expandable lists. By
setting the expanded state using setExpandedState and
dispatching TYPE_WINDOW_CONTENT_CHANGED AccessibilityEvents
with a CONTENT_CHANGE_TYPE_EXPANDED content change type,
you can ensure that screen readers like TalkBack announce
state changes, providing a more intuitive and inclusive user experience.
Indeterminate ProgressBars
Android 16 adds RANGE_TYPE_INDETERMINATE, giving a way for
you to expose RangeInfo for both determinate and
indeterminate ProgressBar widgets, allowing services like
TalkBack to more consistently provide feedback for progress
indicators.
Tri-state CheckBox
The new AccessibilityNodeInfo
getChecked and setChecked(int)
methods in Android 16 now support a "partially checked" state in addition to
"checked" and "unchecked." This replaces the deprecated boolean
isChecked and setChecked(boolean).
Supplemental descriptions
When an accessibility service describes a ViewGroup, it
combines content labels from its child views. If you provide a
contentDescription for the ViewGroup, accessibility services assume you are
also overriding the description of non-focusable child views. This can be
problematic if you want to label things like a drop-down (for example, "Font
Family") while preserving the current selection for accessibility (for example,
"Roboto"). Android 16 adds setSupplementalDescription so
you can provide text that provides information about a ViewGroup without
overriding information from its children.
Required form fields
Android 16 adds setFieldRequired to
AccessibilityNodeInfo so apps can tell an accessibility
service that input to a form field is required. This is an important scenario
for users filling out many types of forms, even things as simple as a required
terms and conditions checkbox, helping users to consistently identify and
quickly navigate between required fields.
LEA वाली कान की मशीनों से वॉइस कॉल करने के लिए, फ़ोन को माइक्रोफ़ोन इनपुट के तौर पर इस्तेमाल करना
Android 16 में, LE Audio की सुविधा वाले कान की मशीन के उपयोगकर्ताओं के लिए, वॉइस कॉल के लिए कान की मशीन में पहले से मौजूद माइक्रोफ़ोन और फ़ोन के माइक्रोफ़ोन के बीच स्विच करने की सुविधा जोड़ी गई है. यह सुविधा, शोर वाले माहौल या ऐसी अन्य स्थितियों में मददगार हो सकती है जहां कान की मशीन के माइक्रोफ़ोन ठीक से काम न कर पाएं.
एलईए हियरिंग एड के लिए, आस-पास की आवाज़ों की वॉल्यूम कंट्रोल करने की सुविधा
Android 16 में, LE Audio की सुविधा वाली कान की मशीन के उपयोगकर्ताओं के लिए, आस-पास की आवाज़ की आवाज़ कम या ज़्यादा करने की सुविधा जोड़ी गई है. यह आवाज़, कान की मशीन के माइक्रोफ़ोन से रिकॉर्ड की जाती है. यह सुविधा, उन स्थितियों में मददगार हो सकती है जहां बैकग्राउंड का शोर बहुत ज़्यादा या बहुत कम हो.
कैमरा
Android 16 में, प्रोफ़ेशनल कैमरा इस्तेमाल करने वालों के लिए बेहतर सपोर्ट उपलब्ध कराया गया है. इससे, सटीक कलर टेंपरेचर और टिंट अडजस्टमेंट के साथ-साथ हाइब्रिड ऑटो एक्सपोज़र की सुविधा मिलती है. नाइट मोड इंडिकेटर की मदद से, आपका ऐप्लिकेशन यह जान पाता है कि नाइट मोड वाले कैमरा सेशन को कब चालू और बंद करना है. Intent ऐक्शन की नई सुविधाओं की मदद से, मोशन फ़ोटो को आसानी से कैप्चर किया जा सकता है. साथ ही, हम HEIC एन्कोडिंग और आईएसओ 21496-1 के ड्राफ़्ट स्टैंडर्ड के नए पैरामीटर की मदद से, अल्ट्रा एचडीआर इमेज को बेहतर बनाते रहेंगे.
हाइब्रिड ऑटो-एक्सपोज़र
Android 16 adds new hybrid auto-exposure modes to Camera2, allowing you to manually control specific aspects of exposure while letting the auto-exposure (AE) algorithm handle the rest. You can control ISO + AE, and exposure time + AE, providing greater flexibility compared to the current approach where you either have full manual control or rely entirely on auto-exposure.
fun setISOPriority() {
// ... (Your existing code before the snippet) ...
val availablePriorityModes = mStaticInfo.characteristics.get(
CameraCharacteristics.CONTROL_AE_AVAILABLE_PRIORITY_MODES
)
// ... (Your existing code between the snippets) ...
// Turn on AE mode to set priority mode
reqBuilder.set(
CaptureRequest.CONTROL_AE_MODE,
CameraMetadata.CONTROL_AE_MODE_ON
)
reqBuilder.set(
CaptureRequest.CONTROL_AE_PRIORITY_MODE,
CameraMetadata.CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY
)
reqBuilder.set(
CaptureRequest.SENSOR_SENSITIVITY,
TEST_SENSITIVITY_VALUE
)
val request: CaptureRequest = reqBuilder.build()
// ... (Your existing code after the snippet) ...
}
कलर टेंपरेचर और टिंट में सटीक बदलाव करने की सुविधा
Android 16 adds camera support for fine color temperature and tint adjustments
to better support professional video recording applications. In previous Android
versions, you could control white balance settings through
CONTROL_AWB_MODE, which contains options limited to a
preset list, such as Incandescent,
Cloudy, and Twilight. The
COLOR_CORRECTION_MODE_CCT enables the use of
COLOR_CORRECTION_COLOR_TEMPERATURE and
COLOR_CORRECTION_COLOR_TINT for precise adjustments of
white balance based on the correlated color temperature.
fun setCCT() {
// ... (Your existing code before this point) ...
val colorTemperatureRange: Range<Int> =
mStaticInfo.characteristics[CameraCharacteristics.COLOR_CORRECTION_COLOR_TEMPERATURE_RANGE]
// Set to manual mode to enable CCT mode
reqBuilder[CaptureRequest.CONTROL_AWB_MODE] = CameraMetadata.CONTROL_AWB_MODE_OFF
reqBuilder[CaptureRequest.COLOR_CORRECTION_MODE] = CameraMetadata.COLOR_CORRECTION_MODE_CCT
reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TEMPERATURE] = 5000
reqBuilder[CaptureRequest.COLOR_CORRECTION_COLOR_TINT] = 30
val request: CaptureRequest = reqBuilder.build()
// ... (Your existing code after this point) ...
}
The following examples show how a photo would look after applying different color temperature and tint adjustments:
कैमरे के नाइट मोड में सीन का पता लगाने की सुविधा
To help your app know when to switch to and from a night mode camera session,
Android 16 adds EXTENSION_NIGHT_MODE_INDICATOR. If
supported, it's available in the CaptureResult within
Camera2.
This is the API we briefly mentioned as coming soon in the How Instagram enabled users to take stunning low light photos blog post. That post is a practical guide on how to implement night mode together with a case study that links higher-quality in-app night mode photos with an increase in the number of photos shared from the in-app camera.
मोशन फ़ोटो कैप्चर करने के इंटेंट ऐक्शन
Android 16 में स्टैंडर्ड इंटेंट ऐक्शन —
ACTION_MOTION_PHOTO_CAPTURE और
ACTION_MOTION_PHOTO_CAPTURE_SECURE — जोड़े गए हैं. इनसे कैमरा ऐप्लिकेशन को मोशन फ़ोटो कैप्चर करने और उसे दिखाने का अनुरोध किया जाता है.
इमेज को कहां लिखा जाएगा, यह कंट्रोल करने के लिए आपको एक अतिरिक्त EXTRA_OUTPUT पास करना होगा या Intent.setClipData(ClipData) के ज़रिए Uri पास करना होगा. अगर आपने कोई ClipData सेट नहीं किया है, तो Context.startActivity(Intent) को कॉल करते समय वह आपके लिए वहां कॉपी हो जाएगा.
अल्ट्रा एचडीआर इमेज को बेहतर बनाने की सुविधा
Android 16 continues our work to deliver dazzling image quality with UltraHDR
images. It adds support for UltraHDR images in the HEIC file
format. These images will get ImageFormat type
HEIC_ULTRAHDR and will contain an embedded gainmap similar
to the existing UltraHDR JPEG format. We're working on AVIF support for UltraHDR
as well, so stay tuned.
In addition, Android 16 implements additional parameters in UltraHDR from the ISO 21496-1 draft standard, including the ability to get and set the colorspace that gainmap math should be applied in, as well as support for HDR encoded base images with SDR gainmaps.
ग्राफ़िक्स
Android 16 में, ग्राफ़िक्स से जुड़े नए सुधार शामिल हैं. जैसे, एजीएसएल की मदद से पसंद के मुताबिक ग्राफ़िक इफ़ेक्ट.
AGSL की मदद से, पसंद के मुताबिक ग्राफ़िकल इफ़ेक्ट
Android 16 में RuntimeColorFilter और
RuntimeXfermode जोड़े गए हैं. इनकी मदद से, थ्रेशोल्ड, सेपिया, और ह्यू सेचुरेशन जैसे जटिल इफ़ेक्ट बनाए जा सकते हैं. साथ ही, इन्हें ड्रॉ कॉल पर लागू किया जा सकता है. Android 13 के बाद से, AGSL का इस्तेमाल करके, Shader को बढ़ाने वाले कस्टम RuntimeShaders बनाए जा सकते हैं. नया एपीआई, AGSL की मदद से काम करने वाला RuntimeColorFilter जोड़ता है, जो ColorFilter को बढ़ाता है. साथ ही, इसमें Xfermode इफ़ेक्ट भी जोड़ा गया है, जिसकी मदद से सोर्स और डेस्टिनेशन पिक्सल के बीच, AGSL पर आधारित कस्टम कंपोजिटिंग और ब्लेंडिंग लागू की जा सकती है.
private val thresholdEffectString = """
uniform half threshold;
half4 main(half4 c) {
half luminosity = dot(c.rgb, half3(0.2126, 0.7152, 0.0722));
half bw = step(threshold, luminosity);
return bw.xxx1 * c.a;
}"""
fun setCustomColorFilter(paint: Paint) {
val filter = RuntimeColorFilter(thresholdEffectString)
filter.setFloatUniform(0.5);
paint.colorFilter = filter
}
कनेक्टिविटी
Android 16, प्लैटफ़ॉर्म को अपडेट करता है, ताकि आपके ऐप्लिकेशन को कम्यूनिकेशन और वायरलेस टेक्नोलॉजी के नए वर्शन का ऐक्सेस मिल सके.
बेहतर सुरक्षा के साथ रेंजिंग
Android 16 adds support for robust security features in Wi-Fi location on supported devices with Wi-Fi 6's 802.11az, allowing apps to combine the higher accuracy, greater scalability, and dynamic scheduling of the protocol with security enhancements including AES-256-based encryption and protection against MITM attacks. This allows it to be used more safely in proximity use cases, such as unlocking a laptop or a vehicle door. 802.11az is integrated with the Wi-Fi 6 standard, leveraging its infrastructure and capabilities for wider adoption and easier deployment.
सामान्य रेंजिंग एपीआई
Android 16 includes the new RangingManager, which provides
ways to determine the distance and angle on supported hardware between the local
device and a remote device. RangingManager supports the usage of a variety of
ranging technologies such as BLE channel sounding, BLE RSSI-based ranging, Ultra
Wideband, and Wi-Fi round trip time.
कंपैनियन डिवाइस मैनेजर डिवाइस की मौजूदगी
Android 16 में, आपके साथी ऐप्लिकेशन की सेवा को बांधने के लिए नए एपीआई पेश किए जा रहे हैं. जब बीएलई की रेंज में डिवाइस होगा और ब्लूटूथ कनेक्ट होगा, तब सेवा बाउंड हो जाएगी. वहीं, जब बीएलई की रेंज में डिवाइस नहीं होगा या ब्लूटूथ डिसकनेक्ट हो जाएगा, तब सेवा अनबाउंड हो जाएगी. ऐप्लिकेशन को DevicePresenceEvent के अलग-अलग वैल्यू के आधार पर, एक नया 'onDevicePresenceEvent()' कॉलबैक मिलेगा.
ज़्यादा जानकारी के लिए, 'startObservingDevicePresence(ObservingDevicePresenceRequest)' देखें.
मीडिया
Android 16 में, मीडिया का अनुभव बेहतर बनाने के लिए कई सुविधाएं शामिल हैं.
फ़ोटो पिकर को बेहतर बनाया गया
The photo picker provides a safe, built-in way for users to grant your app access to selected images and videos from both local and cloud storage, instead of their entire media library. Using a combination of Modular System Components through Google System Updates and Google Play services, it's supported back to Android 4.4 (API level 19). Integration requires just a few lines of code with the associated Android Jetpack library.
Android 16 includes the following improvements to the photo picker:
- Embedded photo picker: New APIs that enable apps to embed the photo picker into their view hierarchy. This allows it to feel like a more integrated part of the app while still leveraging the process isolation that allows users to select media without the app needing overly broad permissions. To maximize compatibility across platform versions and simplify your integration, you'll want to use the forthcoming Android Jetpack library if you want to integrate the embedded photo picker.
- Cloud search in photo picker: New APIs that enable searching from the cloud media provider for the Android photo picker. Search functionality in the photo picker is coming soon.
ऐडवांस प्रोफ़ेशनल वीडियो
Android 16 introduces support for the Advanced Professional Video (APV) codec which is designed to be used for professional level high quality video recording and post production.
The APV codec standard has the following features:
- Perceptually lossless video quality (close to raw video quality)
- Low complexity and high throughput intra-frame-only coding (without pixel domain prediction) to better support editing workflows
- Support for high bit-rate range up to a few Gbps for 2K, 4K and 8K resolution content, enabled by a lightweight entropy coding scheme
- Frame tiling for immersive content and for enabling parallel encoding and decoding
- Support for various chroma sampling formats and bit-depths
- Support for multiple decoding and re-encoding without severe visual quality degradation
- Support multi-view video and auxiliary video like depth, alpha, and preview
- Support for HDR10/10+ and user-defined metadata
A reference implementation of APV is provided through the OpenAPV project. Android 16 will implement support for the APV 422-10 Profile that provides YUV 422 color sampling along with 10-bit encoding and for target bitrates of up to 2Gbps.
निजता
Android 16 में कई ऐसी सुविधाएं शामिल हैं जिनसे ऐप्लिकेशन डेवलपर को उपयोगकर्ता की निजता को सुरक्षित रखने में मदद मिलती है.
Health Connect से जुड़े अपडेट
Health Connect adds ACTIVITY_INTENSITY, a data type defined according to World
Health Organization guidelines around moderate and vigorous activity. Each
record requires the start time, the end time, and whether the activity intensity
is moderate or vigorous.
Health Connect also contains updated APIs supporting medical records. This allows apps to read and write medical records in FHIR format with explicit user consent.
Android पर Privacy Sandbox
Android 16 में, Android पर Privacy Sandbox का नया वर्शन शामिल है. यह टेक्नोलॉजी बनाने के लिए, हम लगातार काम कर रहे हैं. इससे उपयोगकर्ताओं को यह भरोसा रहेगा कि उनकी निजता सुरक्षित है. Android डेवलपर बीटा प्रोग्राम में Privacy Sandbox के बारे में ज़्यादा जानने के लिए, हमारी वेबसाइट पर जाएं. इससे आपको इस प्रोग्राम को शुरू करने में मदद मिलेगी. SDK टूल के रनटाइम के बारे में जानें. इससे SDK टूल, उस ऐप्लिकेशन से अलग एक खास रनटाइम एनवायरमेंट में काम कर पाते हैं जिसमें उन्हें इस्तेमाल किया जा रहा है. साथ ही, उपयोगकर्ता के डेटा को इकट्ठा करने और शेयर करने के लिए ज़्यादा सुरक्षित तरीके उपलब्ध कराए जाते हैं.
सुरक्षा
Android 16 में ऐसी सुविधाएं शामिल हैं जिनकी मदद से, अपने ऐप्लिकेशन की सुरक्षा को बेहतर बनाया जा सकता है. साथ ही, ऐप्लिकेशन के डेटा को सुरक्षित रखा जा सकता है.
कुंजी शेयर करने वाला एपीआई
Android 16 में ऐसे एपीआई जोड़े गए हैं जिनकी मदद से, Android Keystore की कुंजियों का ऐक्सेस दूसरे ऐप्लिकेशन के साथ शेयर किया जा सकता है. नई KeyStoreManager क्लास, ऐप्लिकेशन uid के हिसाब से, पासकोड का ऐक्सेस देने और वापस लेने की सुविधा देती है. साथ ही, इसमें ऐप्लिकेशन के लिए, शेयर की गई पासकोड को ऐक्सेस करने वाला एपीआई भी शामिल है.
डिवाइस के नाप या आकार
Android 16, आपके ऐप्लिकेशन को Android के फ़ॉर्म फ़ैक्टर का ज़्यादा से ज़्यादा फ़ायदा पाने में मदद करता है.
टीवी के लिए, पिक्चर और ऑडियो क्वालिटी का स्टैंडर्ड फ़्रेमवर्क
Android 16 में मौजूद नए MediaQuality
पैकेज में, ऑडियो और पिक्चर प्रोफ़ाइलों के साथ-साथ, हार्डवेयर से जुड़ी सेटिंग को ऐक्सेस करने के लिए, स्टैंडर्ड वाले एपीआई का एक सेट उपलब्ध कराया गया है. इससे स्ट्रीमिंग ऐप्लिकेशन, प्रोफ़ाइलों के बारे में क्वेरी कर सकते हैं और उन्हें मीडिया पर डाइनैमिक तौर पर लागू कर सकते हैं:
- ज़्यादा डाइनैमिक रेंज वाली फ़िल्मों को बेहतर तरीके से देखने के लिए, रंगों की सटीक जानकारी ज़रूरी होती है. इससे, गहरे हिस्सों में मौजूद बारीकियों को देखा जा सकता है और आस-पास की रोशनी के हिसाब से फ़िल्म को अडजस्ट किया जा सकता है. इसलिए, ऐसी प्रोफ़ाइल चुनना बेहतर होता है जो चमक के बजाय रंगों की सटीक जानकारी को प्राथमिकता देती हो.
- खेल-कूद के लाइव इवेंट को अक्सर कम डाइनैमिक रेंज में मास्टर्ड किया जाता है. हालांकि, इन्हें अक्सर दिन के उजाले में देखा जाता है. इसलिए, रंग की सटीक जानकारी के बजाय चमक को प्राथमिकता देने वाली प्रोफ़ाइल से बेहतर नतीजे मिल सकते हैं.
- पूरी तरह से इंटरैक्टिव कॉन्टेंट के लिए, इंतज़ार का समय कम करने के लिए कम से कम प्रोसेसिंग की ज़रूरत होती है. साथ ही, ज़्यादा फ़्रेम रेट की ज़रूरत होती है. इसलिए, कई टीवी में गेम प्रोफ़ाइल होती है.
इस एपीआई की मदद से, ऐप्लिकेशन एक से दूसरी प्रोफ़ाइल पर स्विच कर सकते हैं. साथ ही, उपयोगकर्ता अपने कॉन्टेंट के हिसाब से, टीवी पर चैनल बदल सकते हैं.
इंटरनैशनलाइज़ेशन
Android 16 में ऐसी सुविधाएं और क्षमताएं जोड़ी गई हैं जो किसी डिवाइस को अलग-अलग भाषाओं में इस्तेमाल करने पर, उपयोगकर्ता अनुभव को बेहतर बनाती हैं.
वर्टिकल टेक्स्ट
Android 16 में, टेक्स्ट को वर्टिकल तौर पर रेंडर करने और मेज़र करने के लिए, लो-लेवल की सुविधा जोड़ी गई है. इससे लाइब्रेरी डेवलपर को वर्टिकल तौर पर लिखने की बुनियादी सुविधा मिलती है. यह सुविधा, खास तौर पर जैपनीज़ जैसी भाषाओं के लिए काम की है, जिनमें आम तौर पर वर्टिकल लिखने के सिस्टम का इस्तेमाल किया जाता है. Paint क्लास में एक नया फ़्लैग,
VERTICAL_TEXT_FLAG,
जोड़ा गया है. Paint.setFlags का इस्तेमाल करके इस फ़्लैग को सेट करने पर, Paint के टेक्स्ट मेज़रमेंट एपीआई, हॉरिज़ॉन्टल ऐडवांस के बजाय वर्टिकल ऐडवांस की रिपोर्ट करेंगे. साथ ही, Canvas टेक्स्ट को वर्टिकल तौर पर ड्रॉ करेगा.
val text = "「春は、曙。」"
Box(
Modifier.padding(innerPadding).background(Color.White).fillMaxSize().drawWithContent {
drawIntoCanvas { canvas ->
val paint = Paint().apply { textSize = 64.sp.toPx() }
// Draw text vertically
paint.flags = paint.flags or VERTICAL_TEXT_FLAG
val height = paint.measureText(text)
canvas.nativeCanvas.drawText(
text,
0,
text.length,
size.width / 2,
(size.height - height) / 2,
paint
)
}
}
) {}
मेज़रमेंट सिस्टम को पसंद के मुताबिक बनाना
उपयोगकर्ता अब सेटिंग में जाकर, क्षेत्र के हिसाब से अपनी पसंद के मुताबिक मेज़रमेंट सिस्टम चुन सकते हैं. उपयोगकर्ता की प्राथमिकता को स्थानीय भाषा के कोड के हिस्से के तौर पर शामिल किया जाता है. इसलिए, क्षेत्रीय प्राथमिकताएं बदलने पर, स्थानीय भाषा के कॉन्फ़िगरेशन में होने वाले बदलावों को मैनेज करने के लिए, ACTION_LOCALE_CHANGED पर BroadcastReceiver रजिस्टर किया जा सकता है.
फ़ॉर्मैटर का इस्तेमाल करके, स्थानीय अनुभव को मैच किया जा सकता है. उदाहरण के लिए, अगर किसी उपयोगकर्ता ने अपने फ़ोन पर अंग्रेज़ी (डेनमार्क) भाषा सेट की है या अंग्रेज़ी (अमेरिका) भाषा में, मेज़रमेंट सिस्टम के तौर पर मेट्रिक सिस्टम का इस्तेमाल किया है,तो उसके लिए अंग्रेज़ी (अमेरिका) में "0.5 इंच" का मतलब "12.7 मिमी" होगा.
ये सेटिंग ढूंढने के लिए, Settings ऐप्लिकेशन खोलें और सिस्टम > language & region पर जाएं.