Android 16 में डेवलपर के लिए, कई नई सुविधाएं और एपीआई उपलब्ध कराए गए हैं. यहां दिए गए सेक्शन में, इन सुविधाओं के बारे में खास जानकारी दी गई है. इससे आपको इनसे जुड़े एपीआई का इस्तेमाल शुरू करने में मदद मिलेगी.
नए, बदले गए, और हटाए गए एपीआई की पूरी सूची देखने के लिए, एपीआई में हुए बदलावों की जानकारी देने वाली रिपोर्ट पढ़ें. नए एपीआई के बारे में ज़्यादा जानने के लिए, Android API रेफ़रंस पर जाएं. नए एपीआई को हाइलाइट किया गया है, ताकि वे आसानी से दिख सकें.आपको उन क्षेत्रों की भी समीक्षा करनी चाहिए जहां प्लैटफ़ॉर्म में हुए बदलावों से आपके ऐप्लिकेशन पर असर पड़ सकता है. ज़्यादा जानकारी के लिए, ये पेज देखें:
- Android 16 को टारगेट करने वाले ऐप्लिकेशन के काम करने के तरीके में होने वाले बदलाव
- ऐसे बदलाव जो
targetSdkVersionके बावजूद, सभी ऐप्लिकेशन पर असर डालते हैं.
मुख्य फ़ंक्शन
Android में नए एपीआई शामिल किए गए हैं. इनसे Android सिस्टम की मुख्य क्षमताओं को बढ़ाया जा सकता है.
साल 2025 में Android के दो एपीआई रिलीज़ किए जाएंगे
- This preview is for the next major release of Android with a planned launch in Q2 of 2025. This release is similar to all of our API releases in the past, where we can have planned behavior changes that are often tied to a targetSdkVersion.
- We're planning the major release a quarter earlier (Q2 rather than Q3 in prior years) to better align with the schedule of device launches across our ecosystem, so more devices can get the major release of Android sooner. With the major release coming in Q2, you'll need to do your annual compatibility testing a few months earlier than in previous years to make sure your apps are ready.
- We plan to have another release in Q4 of 2025 which also will include new developer APIs. The Q2 major release will be the only release in 2025 to include planned behavior changes that could affect apps.
In addition to new developer APIs, the Q4 minor release will pick up feature updates, optimizations, and bug fixes; it will not include any app-impacting behavior changes.
We'll continue to have quarterly Android releases. The Q1 and Q3 updates in-between the API releases will provide incremental updates to help ensure continuous quality. We're actively working with our device partners to bring the Q2 release to as many devices as possible.
Using new APIs with major and minor releases
Guarding a code block with a check for API level is done today using
the SDK_INT constant with
VERSION_CODES. This will continue
to be supported for major Android releases.
if (SDK_INT >= VERSION_CODES.BAKLAVA) {
// Use APIs introduced in Android 16
}
The new SDK_INT_FULL
constant can be used for API checks against both major and minor versions with
the new VERSION_CODES_FULL
enumeration.
if (SDK_INT_FULL >= VERSION_CODES_FULL.[MAJOR or MINOR RELEASE]) {
// Use APIs introduced in a major or minor release
}
You can also use the
Build.getMinorSdkVersion()
method to get just the minor SDK version.
val minorSdkVersion = Build.getMinorSdkVersion(VERSION_CODES_FULL.BAKLAVA)
These APIs have not yet been finalized and are subject to change, so please send us feedback if you have any concerns.
उपयोगकर्ता अनुभव और सिस्टम यूज़र इंटरफ़ेस (यूआई)
Android 16, ऐप्लिकेशन डेवलपर और उपयोगकर्ताओं को अपनी ज़रूरतों के हिसाब से डिवाइस को कॉन्फ़िगर करने के लिए, ज़्यादा कंट्रोल और सुविधा देता है.
प्रोग्रेस से जुड़ी सूचनाएं
Android 16 introduces progress-centric notifications to help users seamlessly track user-initiated, start-to-end journeys.
Notification.ProgressStyle is a new notification
style that lets you create progress-centric notifications. Key use cases include
rideshare, delivery, and navigation. Within the Notification.ProgressStyle
class, you can denote states and milestones in a user journey using
points and segments.
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 has exposed control over the haptic actuator ever since its inception.
Android 11 added support for more complex haptic effects that more advanced
actuators could support through
VibrationEffect.Compositions of device-defined semantic
primitives.
Android 16 adds haptic APIs that let apps define the amplitude and frequency curves of a haptic effect while abstracting away differences between device capabilities.
डेवलपर की प्रॉडक्टिविटी और टूल
आपकी प्रॉडक्टिविटी को बेहतर बनाने के लिए, हम ज़्यादातर काम Android Studio, Jetpack Compose, और Android Jetpack लाइब्रेरी जैसे टूल पर करते हैं. हालांकि, हम हमेशा ऐसे तरीके ढूंढते रहते हैं जिनसे आपको अपने विज़न को पूरा करने में मदद मिल सके.
लाइव वॉलपेपर के लिए कॉन्टेंट हैंडलिंग
In Android 16, the live wallpaper framework is gaining a new content API to
address the challenges of dynamic, user-driven wallpapers. Currently, live
wallpapers incorporating user-provided content require complex, service-specific
implementations. Android 16 introduces
WallpaperDescription and
WallpaperInstance. WallpaperDescription lets you
identify distinct instances of a live wallpaper from the same service. For
example, a wallpaper that has instances on both the home screen and on the lock
screen may have unique content in both places. The wallpaper picker and
WallpaperManager use this metadata to better present
wallpapers to users, streamlining the process for you to create diverse and
personalized live wallpaper experiences.
परफ़ॉर्मेंस और बैटरी
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 को Android 15 में जोड़ा गया था. इससे ऐप्लिकेशन को प्रोसेस शुरू होने की वजहें, शुरू होने का टाइप, शुरू होने का समय, थ्रॉटलिंग, और गड़बड़ी की जानकारी देने वाला अन्य काम का डेटा देखने की सुविधा मिलती है. Android 16 में getStartComponent() को जोड़ा गया है, ताकि यह पता लगाया जा सके कि ऐप्लिकेशन को किस तरह के कॉम्पोनेंट ने ट्रिगर किया. इससे, ऐप्लिकेशन के स्टार्टअप फ़्लो को ऑप्टिमाइज़ करने में मदद मिल सकती है.
नौकरी के बारे में बेहतर जानकारी
JobScheduler#getPendingJobReason() एपीआई, किसी जॉब के लंबित होने की वजह बताता है. हालांकि, किसी जॉब के पूरा न होने की कई वजहें हो सकती हैं.
हम Android 16 में एक नया एपीआई JobScheduler#getPendingJobReasons(int jobId) पेश कर रहे हैं. इससे, किसी जॉब के लंबे समय से पेंडिंग होने की कई वजहें पता चलती हैं. ये वजहें, डेवलपर की ओर से सेट की गई साफ़ तौर पर बताई गई पाबंदियों और सिस्टम की ओर से सेट की गई छिपी हुई पाबंदियों, दोनों की वजह से होती हैं.
हम JobScheduler#getPendingJobReasonsHistory(int jobId) को भी पेश कर रहे हैं. इससे, पाबंदी में हुए सबसे हाल के बदलावों की सूची दिखती है.
हमारा सुझाव है कि एपीआई का इस्तेमाल करके, यह पता लगाएं कि आपकी जॉब क्यों नहीं चल रही हैं. ऐसा खास तौर पर तब करें, जब आपको कुछ टास्क के पूरा होने की दर में कमी दिख रही हो या किसी जॉब के पूरा होने में लगने वाले समय से जुड़ी गड़बड़ियां दिख रही हों. उदाहरण के लिए, बैकग्राउंड में विजेट अपडेट नहीं हो पाए या ऐप्लिकेशन शुरू होने से पहले, डेटा को पहले से लोड करने की सुविधा को कॉल नहीं किया जा सका.
इससे आपको यह समझने में भी मदद मिल सकती है कि कुछ जॉब, सिस्टम की तय की गई पाबंदियों की वजह से पूरी नहीं हो रहे हैं या साफ़ तौर पर सेट की गई पाबंदियों की वजह से.
अडैप्टिव रीफ़्रेश रेट
Adaptive refresh rate (ARR), introduced in Android 15, enables the display refresh rate on supported hardware to adapt to the content frame rate using discrete VSync steps. This reduces power consumption while eliminating the need for potentially jank-inducing mode-switching.
Android 16 introduces hasArrSupport() and
getSuggestedFrameRate(int) while restoring
getSupportedRefreshRates() to make it easier for your apps to take
advantage of ARR. RecyclerView
1.4 internally supports ARR when it is settling from a fling or
smooth scroll, and we're continuing our work to add ARR
support into more Jetpack libraries. This frame rate article covers
many of the APIs you can use to set the frame rate so that your app can directly
use ARR.
ADPF में हेडरूम एपीआई
The SystemHealthManager introduces the
getCpuHeadroom and
getGpuHeadroom APIs, designed to provide games and
resource-intensive apps with estimates of available CPU and GPU resources. These
methods offer a way for you to gauge how your app or game can best improve
system health, particularly when used in conjunction with other Android Dynamic
Performance Framework (ADPF) APIs that detect thermal
throttling.
By using CpuHeadroomParams and
GpuHeadroomParams on supported devices, you can
customize the time window used to compute the headroom and select between
average or minimum resource availability. This can help you reduce your CPU or
GPU resource usage accordingly, leading to better user experiences and improved
battery life.
सुलभता
Android 16 में, ऐक्सेसिबिलिटी से जुड़े नए एपीआई और सुविधाएं जोड़ी गई हैं. इनकी मदद से, अपने ऐप्लिकेशन को हर उपयोगकर्ता तक पहुंचाया जा सकता है.
बेहतर सुलभता वाले एपीआई
Android 16 में यूज़र इंटरफ़ेस (यूआई) के सेमेटिक्स को बेहतर बनाने के लिए, अतिरिक्त एपीआई जोड़े गए हैं. इससे TalkBack जैसी सुलभता सेवाओं पर निर्भर उपयोगकर्ताओं के लिए, यूज़र इंटरफ़ेस को एक जैसा रखने में मदद मिलती है.
टेक्स्ट का कंट्रास्ट बढ़ाने के लिए, टेक्स्ट को आउटलाइन करना
कम विज़न वाले उपयोगकर्ताओं को अक्सर कंट्रास्ट की संवेदनशीलता कम होती है. इससे, ऑब्जेक्ट को उनके बैकग्राउंड से अलग करना मुश्किल हो जाता है. इन उपयोगकर्ताओं की मदद करने के लिए, Android 16 में आउटलाइन टेक्स्ट की सुविधा जोड़ी गई है. यह ज़्यादा कंट्रास्ट वाले टेक्स्ट की जगह लेती है. यह टेक्स्ट के चारों ओर, कंट्रास्ट वाला बड़ा हिस्सा बनाती है, ताकि टेक्स्ट को आसानी से पढ़ा जा सके.
Android 16 में नए AccessibilityManager एपीआई शामिल हैं. इनकी मदद से, आपके ऐप्लिकेशन यह जांच कर सकते हैं कि यह मोड चालू है या नहीं. इसके अलावा, किसी लिसनर को रजिस्टर भी किया जा सकता है. यह मुख्य रूप से Compose जैसे यूज़र इंटरफ़ेस टूलकिट के लिए है, ताकि उनमें भी ऐसा ही विज़ुअल अनुभव दिया जा सके. अगर आपके पास यूज़र इंटरफ़ेस टूलकिट लाइब्रेरी है या आपका ऐप्लिकेशन, android.text.Layout क्लास को बायपास करने वाला कस्टम टेक्स्ट रेंडर करता है, तो इस सुविधा का इस्तेमाल करके यह पता लगाया जा सकता है कि आउटलाइन टेक्स्ट कब चालू है.
TtsSpan में अवधि जोड़ी गई
Android 16 में TtsSpan को TYPE_DURATION के साथ जोड़ा गया है. इसमें ARG_HOURS, ARG_MINUTES, और ARG_SECONDS शामिल हैं. इससे, वीडियो के दिखने का कुल समय सीधे तौर पर एनोटेट किया जा सकता है. इससे, TalkBack जैसी सेवाओं की मदद से, लिखाई को बोली में बदलने की सुविधा के सटीक और एक जैसे नतीजे मिलते हैं.
एक से ज़्यादा लेबल वाले एलिमेंट के साथ काम करना
फ़िलहाल, Android में यूज़र इंटरफ़ेस (यूआई) एलिमेंट को एक-दूसरे से, सुलभता लेबल पाने की अनुमति है. साथ ही, अब एक से ज़्यादा लेबल जोड़े जा सकते हैं. यह वेब कॉन्टेंट में आम तौर पर होता है. AccessibilityNodeInfo में सूची पर आधारित एपीआई को शामिल करके, Android सीधे तौर पर इन कई लेबल वाले संबंधों का इस्तेमाल कर सकता है. इस बदलाव के तहत, हमने AccessibilityNodeInfo#setLabeledBy और #getLabeledBy को बंद कर दिया है. अब इनकी जगह #addLabeledBy, #removeLabeledBy, और #getLabeledByList का इस्तेमाल किया जाएगा.
बड़ा किए जा सकने वाले एलिमेंट के लिए बेहतर सहायता
Android 16 में, सुलभता एपीआई जोड़े गए हैं. इनकी मदद से, इंटरैक्टिव एलिमेंट की स्थिति को बड़ा या छोटा किया जा सकता है. जैसे, मेन्यू और बड़ा की जा सकने वाली सूचियां. setExpandedState का इस्तेमाल करके, बड़ा किया गया स्टेटस सेट करके और CONTENT_CHANGE_TYPE_EXPANDED कॉन्टेंट में बदलाव के टाइप के साथ TYPE_WINDOW_CONTENT_CHANGED AccessibilityEvents भेजकर, यह पक्का किया जा सकता है कि TalkBack जैसे स्क्रीन रीडर, स्टेटस में हुए बदलावों की सूचना दें. इससे, उपयोगकर्ताओं को बेहतर और आसान अनुभव मिलता है.
प्रोग्रेस बार के लिए तय नहीं किया गया
Android 16 में RANGE_TYPE_INDETERMINATE जोड़ा गया है. इससे, आपको ProgressBar विजेट के लिए, RangeInfo को दिखाने का विकल्प मिलता है. इसकी मदद से, TalkBack जैसी सेवाएं, प्रोग्रेस इंडिकेटर के लिए लगातार सुझाव दे सकती हैं.
तीन स्थितियों वाला चेकबॉक्स
Android 16 में, AccessibilityNodeInfo
getChecked और setChecked(int) के नए तरीकों का इस्तेमाल करके, अब "चुनी गई" और "चुनी नहीं गई" के अलावा, "कुछ हिस्से को चुना गया" स्थिति भी सेट की जा सकती है. यह, अब काम न करने वाले बूलियन isChecked और setChecked(boolean) फ़ंक्शन की जगह ले लेगा.
अतिरिक्त जानकारी
जब कोई सुलभता सेवा किसी ViewGroup के बारे में बताती है, तो वह अपने ब्यौरे में उस व्यू के चाइल्ड व्यू के कॉन्टेंट लेबल को भी शामिल कर लेती है. अगर आपने ViewGroup के लिए कोई contentDescription दिया है, तो सुलभता सेवाएं यह मान लेती हैं कि आपने फ़ोकस नहीं किए जा सकने वाले चाइल्ड व्यू के ब्यौरे को भी बदल दिया है. अगर आपको सुलभता के लिए चुने गए मौजूदा विकल्प (उदाहरण के लिए, "Roboto") को बनाए रखते हुए, ड्रॉप-डाउन (उदाहरण के लिए, "फ़ॉन्ट फ़ैमिली") जैसी चीज़ों को लेबल करना है, तो समस्या आ सकती है. Android 16 में setSupplementalDescription जोड़ा गया है, ताकि आप ViewGroup के बारे में जानकारी देने वाला टेक्स्ट दे सकें. ऐसा करने पर, ViewGroup के बच्चों की जानकारी बदली नहीं जाएगी.
फ़ॉर्म के ज़रूरी फ़ील्ड
Android 16 में, AccessibilityNodeInfo में setFieldRequired जोड़ा गया है, ताकि ऐप्लिकेशन किसी सुलभता सेवा को बता सकें कि फ़ॉर्म फ़ील्ड में इनपुट करना ज़रूरी है. यह कई तरह के फ़ॉर्म भरने वाले उपयोगकर्ताओं के लिए एक अहम स्थिति है. यहां तक कि ज़रूरी शर्तों वाले चेकबॉक्स जैसी आसान चीज़ों के लिए भी यह ज़रूरी है. इससे उपयोगकर्ताओं को ज़रूरी फ़ील्ड की पहचान करने और उनमें तेज़ी से नेविगेट करने में मदद मिलती है.
LEA वाली कान की मशीनों से वॉइस कॉल करने के लिए, फ़ोन को माइक्रोफ़ोन इनपुट के तौर पर इस्तेमाल करना
Android 16 adds the capability for users of LE Audio hearing aids to switch between the built-in microphones on the hearing aids and the microphone on their phone for voice calls. This can be helpful in noisy environments or other situations where the hearing aid's microphones might not perform well.
एलईए हियरिंग एड के लिए, आस-पास की आवाज़ों की वॉल्यूम कंट्रोल करने की सुविधा
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 adds standard Intent actions —
ACTION_MOTION_PHOTO_CAPTURE, and
ACTION_MOTION_PHOTO_CAPTURE_SECURE — which request that
the camera application capture a motion photo and return
it.
You must either pass an extra EXTRA_OUTPUT to control
where the image will be written, or a Uri through
Intent.setClipData(ClipData). If you don't set a
ClipData, it will be copied there for you when calling
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 की मदद से पसंद के मुताबिक ग्राफ़िक इफ़ेक्ट.
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.
कंपैनियन डिवाइस मैनेजर डिवाइस के मौजूद होने की जानकारी
In Android 16, new APIs are being introduced for binding your companion app
service. Service will be bound when BLE is in range and Bluetooth is connected
and service will be unbound when BLE is out of range or Bluetooth is
disconnected. App will receives a new
'onDevicePresenceEvent()' callback based on various
of DevicePresenceEvent.
More details can be found in
'startObservingDevicePresence(ObservingDevicePresenceRequest)'.
मीडिया
Android 16 में कई ऐसी सुविधाएं शामिल हैं जिनसे मीडिया का अनुभव बेहतर होता है.
फ़ोटो पिकर को बेहतर बनाया गया
फ़ोटो पिकर की सुविधा, उपयोगकर्ताओं के लिए ऐप्लिकेशन में पहले से मौजूद है. इसकी मदद से, उपयोगकर्ता अपने डिवाइस की पूरी मीडिया लाइब्रेरी के बजाय, ऐप्लिकेशन को सिर्फ़ अपनी चुनी हुई फ़ोटो और वीडियो का ऐक्सेस दे सकते हैं. यह सुविधा सुरक्षित है. Google के सिस्टम अपडेट और Google Play services की मदद से, मॉड्यूलर सिस्टम कॉम्पोनेंट का इस्तेमाल करके, यह सुविधा Android 4.4 (एपीआई लेवल 19) तक के वर्शन पर काम करती है. इंटिग्रेशन के लिए, Android Jetpack लाइब्रेरी के साथ सिर्फ़ कुछ लाइनों का कोड ज़रूरी है.
Android 16 में, फ़ोटो पिकर में ये सुधार किए गए हैं:
- एम्बेड किया गया फ़ोटो पिकर: नए एपीआई, जिनकी मदद से ऐप्लिकेशन, फ़ोटो पिकर को अपने व्यू की हैरारकी में एम्बेड कर सकते हैं. इससे, यह ऐप्लिकेशन के एक बेहतर हिस्से की तरह महसूस होता है. साथ ही, प्रोसेस को अलग रखने की सुविधा का फ़ायदा भी मिलता है. इस सुविधा की मदद से, उपयोगकर्ता ऐप्लिकेशन को ज़्यादा अनुमतियां दिए बिना ही मीडिया चुन सकते हैं. अगर आपको एम्बेड किए गए फ़ोटो पिकर को इंटिग्रेट करना है, तो आपको Android के आने वाले समय में लॉन्च होने वाली Jetpack लाइब्रेरी का इस्तेमाल करना होगा. इससे, सभी प्लैटफ़ॉर्म के वर्शन के साथ काम करने की सुविधा बढ़ेगी और इंटिग्रेशन आसान हो जाएगा.
- फ़ोटो पिकर में क्लाउड सर्च: Android फ़ोटो पिकर के लिए, क्लाउड मीडिया प्रोवाइडर से खोजने की सुविधा देने वाले नए एपीआई. फ़ोटो चुनने वाले टूल में खोजने की सुविधा जल्द ही उपलब्ध होगी.
ऐडवांस प्रोफ़ेशनल वीडियो
Android 16 में ऐडवांस प्रोफ़ेशनल वीडियो (एपीवी) कोडेक के लिए सहायता उपलब्ध है. इसे प्रोफ़ेशनल लेवल की अच्छी क्वालिटी वाली वीडियो रिकॉर्डिंग और पोस्ट प्रोडक्शन के लिए डिज़ाइन किया गया है.
APV कोडेक स्टैंडर्ड में ये सुविधाएं शामिल हैं:
- वीडियो की क्वालिटी में कोई बदलाव नहीं होता (रॉ वीडियो की क्वालिटी के करीब)
- एडिट करने के वर्कफ़्लो को बेहतर बनाने के लिए, कम कॉम्प्लेक्सिटी और ज़्यादा थ्रूपुट वाला सिर्फ़ इंट्रा-फ़्रेम कोडिंग (बिना पिक्सल डोमेन का अनुमान लगाए)
- 2K, 4K, और 8K रिज़ॉल्यूशन वाले कॉन्टेंट के लिए, कुछ जीबीपीएस तक की हाई बिटरेट रेंज के साथ काम करता है. यह सुविधा, लाइटवाइट एन्ट्रापी कोडिंग स्कीम की मदद से चालू होती है
- बेहतर अनुभव देने वाले कॉन्टेंट के लिए फ़्रेम टाइल करना. साथ ही, पैरलल एन्कोडिंग और डिकोडिंग की सुविधा चालू करना
- अलग-अलग क्रोम सैंपलिंग फ़ॉर्मैट और बिट-डेप्थ के साथ काम करना
- विज़ुअल क्वालिटी में ज़्यादा गिरावट के बिना, कई बार डिकोड करने और फिर से एन्कोड करने की सुविधा
- मल्टीव्यू वीडियो और सहायक वीडियो के साथ काम करना, जैसे कि डेप्थ, ऐल्फ़ा, और झलक
- HDR10/10+ और उपयोगकर्ता के तय किए गए मेटाडेटा के लिए काम करना
OpenAPV प्रोजेक्ट के ज़रिए, एपीवी को लागू करने का रेफ़रंस दिया जाता है. Android 16 में, APV 422-10 प्रोफ़ाइल के लिए सहायता लागू की जाएगी. यह प्रोफ़ाइल, 10-बिट एन्कोडिंग के साथ-साथ YUV 422 कलर सैंपलिंग की सुविधा देती है. साथ ही, 2 जीबीपीएस तक की टारगेट बिटरेट के लिए भी काम करती है.
निजता
Android 16 में कई ऐसी सुविधाएं शामिल हैं जिनसे ऐप्लिकेशन डेवलपर को उपयोगकर्ता की निजता को सुरक्षित रखने में मदद मिलती है.
Health Connect से जुड़े अपडेट
Health Connect में ACTIVITY_INTENSITY जोड़ा गया है. यह डेटा टाइप, विश्व स्वास्थ्य संगठन के दिशा-निर्देशों के मुताबिक, सामान्य और ज़्यादा गतिविधि के आधार पर तय किया जाता है. हर रिकॉर्ड के लिए, शुरू होने का समय, खत्म होने का समय, और गतिविधि की तीव्रता सामान्य है या ज़्यादा मेहनत वाली है, यह जानकारी देना ज़रूरी है.
Health Connect में, मेडिकल रिकॉर्ड के साथ काम करने वाले अपडेट किए गए एपीआई भी शामिल हैं. इससे ऐप्लिकेशन, उपयोगकर्ता की सहमति के साथ, एफ़एचआईआर फ़ॉर्मैट में मौजूद मेडिकल रिकॉर्ड पढ़ और लिख सकते हैं.
Android पर Privacy Sandbox
Android 16 incorporates the latest version of the Privacy Sandbox on Android, part of our ongoing work to develop technologies where users know their privacy is protected. Our website has more about the Privacy Sandbox on Android developer beta program to help you get started. Check out the SDK Runtime which allows SDKs to run in a dedicated runtime environment separate from the app they are serving, providing stronger safeguards around user data collection and sharing.
सुरक्षा
Android 16 में ऐसी सुविधाएं शामिल हैं जिनकी मदद से, अपने ऐप्लिकेशन की सुरक्षा को बेहतर बनाया जा सकता है. साथ ही, ऐप्लिकेशन के डेटा को सुरक्षित रखा जा सकता है.
कुंजी शेयर करने वाला एपीआई
Android 16 adds APIs that support sharing access to
Android Keystore keys with other apps. The new
KeyStoreManager class supports
granting and revoking access to keys
by app uid, and includes an API for apps to access shared
keys.
डिवाइस के नाप या आकार
Android 16, आपके ऐप्लिकेशन को Android के फ़ॉर्म फ़ैक्टर का ज़्यादा से ज़्यादा फ़ायदा पाने में मदद करता है.
टीवी के लिए, पिक्चर और ऑडियो क्वालिटी का स्टैंडर्ड फ़्रेमवर्क
Android 16 में मौजूद नए MediaQuality
पैकेज में, ऑडियो और पिक्चर प्रोफ़ाइलों के साथ-साथ, हार्डवेयर से जुड़ी सेटिंग को ऐक्सेस करने के लिए, स्टैंडर्ड वाले एपीआई का एक सेट उपलब्ध कराया गया है. इससे स्ट्रीमिंग ऐप्लिकेशन, प्रोफ़ाइलों के बारे में क्वेरी कर सकते हैं और उन्हें मीडिया पर डाइनैमिक तौर पर लागू कर सकते हैं:
- ज़्यादा डाइनैमिक रेंज वाली फ़िल्मों को बेहतर तरीके से देखने के लिए, रंगों की सटीक जानकारी ज़रूरी होती है. इससे, गहरे हिस्सों में मौजूद बारीकियों को देखा जा सकता है और आस-पास की रोशनी के हिसाब से फ़िल्म को अडजस्ट किया जा सकता है. इसलिए, ऐसी प्रोफ़ाइल चुनना बेहतर होता है जो चमक के बजाय रंगों की सटीक जानकारी को प्राथमिकता देती हो.
- खेल-कूद के लाइव इवेंट को अक्सर कम डाइनैमिक रेंज में मास्टर्ड किया जाता है. हालांकि, इन्हें अक्सर दिन के उजाले में देखा जाता है. इसलिए, रंग की सटीक जानकारी के बजाय चमक को प्राथमिकता देने वाली प्रोफ़ाइल से बेहतर नतीजे मिल सकते हैं.
- पूरी तरह से इंटरैक्टिव कॉन्टेंट के लिए, इंतज़ार का समय कम करने के लिए कम से कम प्रोसेसिंग की ज़रूरत होती है. साथ ही, ज़्यादा फ़्रेम रेट की ज़रूरत होती है. इसलिए, कई टीवी में गेम प्रोफ़ाइल होती है.
इस एपीआई की मदद से, ऐप्लिकेशन एक से दूसरी प्रोफ़ाइल पर स्विच कर सकते हैं. साथ ही, उपयोगकर्ता अपने कॉन्टेंट के हिसाब से, टीवी पर चैनल बदल सकते हैं.
इंटरनैशनलाइज़ेशन
Android 16 में ऐसी सुविधाएं और क्षमताएं जोड़ी गई हैं जो अलग-अलग भाषाओं में डिवाइस इस्तेमाल करने पर, उपयोगकर्ता अनुभव को बेहतर बनाती हैं.
वर्टिकल टेक्स्ट
Android 16 adds low-level support for rendering and measuring text vertically to
provide foundational vertical writing support for library developers. This is
particularly useful for languages like Japanese that commonly use vertical
writing systems. A new flag,
VERTICAL_TEXT_FLAG,
has been added to the Paint class. When
this flag is set using
Paint.setFlags, Paint's
text measurement APIs will report vertical advances instead of horizontal
advances, and Canvas will draw text
vertically.
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 पर जाएं.