Android 15 में डेवलपर के लिए कई बेहतरीन सुविधाएं और एपीआई उपलब्ध हैं. यहां दिए गए सेक्शन में, इन सुविधाओं के बारे में खास जानकारी दी गई है. इससे आपको इनसे जुड़े एपीआई का इस्तेमाल शुरू करने में मदद मिलेगी.
जोड़े गए, बदले गए, और हटाए गए एपीआई की पूरी सूची देखने के लिए, एपीआई में हुए बदलावों की जानकारी देने वाली रिपोर्ट पढ़ें. जोड़े गए एपीआई के बारे में ज़्यादा जानने के लिए, Android API रेफ़रंस पर जाएं. Android 15 के लिए, एपीआई लेवल 35 में जोड़े गए एपीआई देखें. उन क्षेत्रों के बारे में जानने के लिए जहां प्लैटफ़ॉर्म में हुए बदलावों का असर आपके ऐप्लिकेशन पर पड़ सकता है, Android 15 के काम करने के तरीके में हुए बदलावों के बारे में ज़रूर जानें. ये बदलाव, Android 15 को टारगेट करने वाले ऐप्लिकेशन और सभी ऐप्लिकेशन के लिए किए गए हैं.
कैमरा और मीडिया
Android 15 में कई ऐसी सुविधाएं शामिल हैं जो कैमरा और मीडिया के अनुभव को बेहतर बनाती हैं. साथ ही, इसमें आपको ऐसे टूल और हार्डवेयर का ऐक्सेस मिलता है जिनकी मदद से, क्रिएटर्स Android पर अपनी कल्पना को साकार कर पाते हैं.
Android मीडिया और कैमरे के लिए, नई सुविधाओं और डेवलपर के लिए उपलब्ध समाधानों के बारे में ज़्यादा जानने के लिए, Google I/O में हुई Android मीडिया और कैमरे के लिए आधुनिक अनुभव तैयार करना टॉक देखें.
कम रोशनी वाला मोड
Android 15 में कम रोशनी में बेहतर फ़ोटो क्वालिटी की सुविधा जोड़ी गई है. यह ऑटो-एक्सपोज़र मोड है, जो Camera 2 और नाइट मोड कैमरा एक्सटेंशन, दोनों के लिए उपलब्ध है. कम रोशनी वाला मोड, कम रोशनी वाली स्थितियों में झलक स्ट्रीम के एक्सपोज़र को अडजस्ट करता है. यह तरीका, नाइट मोड कैमरा एक्सटेंशन के स्टिल इमेज बनाने के तरीके से अलग है. ऐसा इसलिए है, क्योंकि नाइट मोड एक बेहतर इमेज बनाने के लिए, बर्स्ट फ़ोटो को जोड़ता है. नाइट मोड, स्टिल इमेज बनाने के लिए बहुत अच्छा काम करता है. हालांकि, यह फ़्रेम की लगातार स्ट्रीम नहीं बना सकता. हालांकि, लो लाइट बूस्ट की सुविधा से ऐसा किया जा सकता है. इसलिए, कम रोशनी में बेहतर फ़ोटो लेने की सुविधा, कैमरे की इन सुविधाओं को चालू करती है:
- इमेज की बेहतर झलक दिखाने की सुविधा, ताकि उपयोगकर्ता कम रोशनी में बेहतर तरीके से फ़ोटो खींच सकें
- कम रोशनी में क्यूआर कोड स्कैन करना
कम रोशनी वाला मोड चालू करने पर, यह कम रोशनी होने पर अपने-आप चालू हो जाता है और ज़्यादा रोशनी होने पर बंद हो जाता है.
ऐप्लिकेशन, कम रोशनी में झलक वाली स्ट्रीम को रिकॉर्ड कर सकते हैं, ताकि ज़्यादा रोशनी वाला वीडियो सेव किया जा सके.
ज़्यादा जानकारी के लिए, कम रोशनी में बेहतर फ़ोटो लेने की सुविधा देखें.
ऐप्लिकेशन में कैमरे के कंट्रोल
Android 15 में एक एक्सटेंशन जोड़ा गया है. इससे, जिन डिवाइसों पर यह वर्शन काम करता है उन पर कैमरे के हार्डवेयर और उसके एल्गोरिदम को ज़्यादा बेहतर तरीके से कंट्रोल किया जा सकता है:
- फ़्लैश की रोशनी में बदलाव करने की बेहतर सुविधा. इससे इमेज कैप्चर करते समय,
SINGLE
औरTORCH
, दोनों मोड में फ़्लैश की रोशनी को सटीक तरीके से कंट्रोल किया जा सकता है.
एचडीआर हेडरूम कंट्रोल
Android 15 chooses HDR headroom that is appropriate for the underlying device
capabilities and bit-depth of the panel. For pages that have lots of SDR
content, such as a messaging app displaying a single HDR thumbnail, this
behavior can end up adversely influencing the perceived brightness of the SDR
content. Android 15 lets you control the HDR headroom with
setDesiredHdrHeadroom
to strike a balance between SDR
and HDR content.
लाउडनेस कंट्रोल
Android 15 में, आवाज़ के लिए CTA-2075 स्टैंडर्ड का इस्तेमाल करने की सुविधा जोड़ी गई है. इससे, ऑडियो की आवाज़ में होने वाले उतार-चढ़ावों से बचा जा सकता है. साथ ही, यह भी पक्का किया जा सकता है कि उपयोगकर्ताओं को कॉन्टेंट के बीच स्विच करते समय, वॉल्यूम को बार-बार अडजस्ट न करना पड़े. यह सिस्टम, आउटपुट डिवाइसों (हेडफ़ोन और स्पीकर) की जाने-पहचानी विशेषताओं के साथ-साथ, AAC ऑडियो कॉन्टेंट में उपलब्ध आवाज़ के मेटाडेटा का फ़ायदा उठाता है. इससे, ऑडियो की आवाज़ और डाइनैमिक रेंज कम्प्रेशन के लेवल को बेहतर तरीके से अडजस्ट किया जा सकता है.
इस सुविधा को चालू करने के लिए, आपको यह पक्का करना होगा कि आवाज़ की आवाज़ से जुड़ा मेटाडेटा
आपकी AAC सामग्री पर ध्यान दें और अपने ऐप्लिकेशन में प्लैटफ़ॉर्म सुविधा सक्षम करें. इसके लिए, आपको
LoudnessCodecController
ऑब्जेक्ट को इसके हिसाब से इंस्टैंशिएट करें
ऑडियो के साथ बनाएँ बनाने का तरीका
संबंधित खाते का सेशन आईडी AudioTrack
; यह
अपने-आप ऑडियो अपडेट लागू करना शुरू कर देता है. मदद के लिए
बदलाव करने या फ़िल्टर करने के लिए OnLoudnessCodecUpdateListener
तेज़ आवाज़ के पैरामीटर
MediaCodec
.
// Media contains metadata of type MPEG_4 OR MPEG_D
val mediaCodec = …
val audioTrack = AudioTrack.Builder()
.setSessionId(sessionId)
.build()
...
// Create new loudness controller that applies the parameters to the MediaCodec
try {
val lcController = LoudnessCodecController.create(mSessionId)
// Starts applying audio updates for each added MediaCodec
}
AndroidX media3 ExoPlayer भी अपडेट किया जाएगा, ताकि
ऐप्लिकेशन के आसान इंटिग्रेशन के लिए, LoudnessCodecController
API.
वर्चुअल एमआईडीआई 2.0 डिवाइस
Android 13 added support for connecting to MIDI 2.0 devices using USB, which communicate using Universal MIDI Packets (UMP). Android 15 extends UMP support to virtual MIDI apps, enabling composition apps to control synthesizer apps as a virtual MIDI 2.0 device just like they would with an USB MIDI 2.0 device.
AV1 सॉफ़्टवेयर डिकोडिंग को ज़्यादा बेहतर तरीके से इस्तेमाल करना
VideoLAN का लोकप्रिय AV1 सॉफ़्टवेयर डीकोडर dav1d, उन Android डिवाइसों के लिए उपलब्ध है जिनमें हार्डवेयर में AV1 को डिकोड करने की सुविधा नहीं है. dav1d, लेगसी AV1 सॉफ़्टवेयर डीकोडर की तुलना में तीन गुना ज़्यादा बेहतर परफ़ॉर्म करता है. इससे ज़्यादा उपयोगकर्ताओं के लिए, एचडी AV1 प्लेबैक की सुविधा मिलती है. इनमें कुछ लो और मिड टीयर डिवाइस भी शामिल हैं.
आपके ऐप्लिकेशन को dav1d का इस्तेमाल करने के लिए, नाम "c2.android.av1-dav1d.decoder"
डालकर उसे ऑप्ट-इन करना होगा. अगले अपडेट में, dav1d को डिफ़ॉल्ट AV1 सॉफ़्टवेयर डिकोडर बनाया जाएगा. यह सुविधा, Android 11 वाले उन डिवाइसों के लिए स्टैंडर्ड और बैकपोर्ट की गई है जिन्हें Google Play के सिस्टम अपडेट मिलते हैं.
डेवलपर की प्रॉडक्टिविटी और टूल
आपकी प्रॉडक्टिविटी को बेहतर बनाने के लिए, हम ज़्यादातर काम Android Studio, Jetpack Compose, और Android Jetpack लाइब्रेरी जैसे टूल पर करते हैं. हालांकि, हम हमेशा ऐसे तरीके ढूंढते रहते हैं जिनसे आपको अपने विज़न को आसानी से पूरा करने में मदद मिल सके.
OpenJDK 17 के अपडेट
Android 15 continues the work of refreshing Android's core libraries to align with the features in the latest OpenJDK LTS releases.
The following key features and improvements are included:
- Quality-of-life improvements around NIO buffers
- Streams
- Additional
math
andstrictmath
methods util
package updates including sequencedcollection
,map
, andset
ByteBuffer
support inDeflater
- Security updates such as
X500PrivateCredential
and security key updates
These APIs are updated on over a billion devices running Android 12 (API level 31) and higher through Google Play System updates, so you can target the latest programming features.
PDF फ़ाइल से जुड़े सुधार
Android 15 में, PdfRenderer
एपीआई में काफ़ी सुधार किए गए हैं. ऐप्लिकेशन में बेहतर सुविधाएं शामिल की जा सकती हैं. जैसे, पासवर्ड से सुरक्षित फ़ाइलों को रेंडर करना, एनोटेशन, फ़ॉर्म में बदलाव करना, खोजना, और कॉपी करने के साथ चुनें. लीनियर फ़ॉर्मैट में PDF
लोकल PDF देखने की रफ़्तार और संसाधन के इस्तेमाल को कम करने के लिए, ऑप्टिमाइज़ेशन का इस्तेमाल किया जा सकता है.
Jetpack PDF लाइब्रेरी में इन एपीआई का इस्तेमाल किया जाता है, ताकि PDF को आसानी से जोड़ा जा सके
देखने की क्षमता बढ़ाने के लिए.
PdfRenderer
को ऐसे मॉड्यूल में ले जाया गया है जिसे Google का इस्तेमाल करके अपडेट किया जा सकता है
Play के सिस्टम से जुड़े अपडेट, प्लैटफ़ॉर्म के रिलीज़ होने के बाद भी उपलब्ध नहीं होते. हम
ये बदलाव, Android 11 (एपीआई लेवल 30) पर वापस आ जाएंगे. इसके लिए, यह एपीआई लेवल 30 के साथ काम करने वाला
Android 15 से पहले का एपीआई सरफ़ेस का वर्शन.
PdfRendererPreV
.
अपने-आप भाषा बदलने की सुविधा में सुधार
Android 14 में, ऑडियो में कई भाषाओं की पहचान करने की सुविधा जोड़ी गई है. साथ ही, भाषाओं के बीच अपने-आप स्विच करने की सुविधा भी जोड़ी गई है. हालांकि, इससे शब्दों को छोड़ा जा सकता है. ऐसा खास तौर पर तब होता है, जब दो वाक्यांशों के बीच कम समय के लिए भाषा स्विच की जाती है. Android 15 में अतिरिक्त कंट्रोल जोड़े गए हैं, ताकि ऐप्लिकेशन अपने इस्तेमाल के हिसाब से, इस स्विचिंग को ट्यून कर सकें.
EXTRA_LANGUAGE_SWITCH_INITIAL_ACTIVE_DURATION_TIME_MILLIS
, ऑडियो सेशन की शुरुआत में ही अपने-आप स्विच होने की सुविधा को सीमित करता है. वहीं, EXTRA_LANGUAGE_SWITCH_MATCH_SWITCHES
, तय संख्या में स्विच करने के बाद, भाषा स्विच करने की सुविधा को बंद कर देता है. ये विकल्प तब खास तौर पर काम के होते हैं, जब आपको लगता है कि सेशन के दौरान एक ही भाषा बोली जाएगी और उसकी पहचान अपने-आप होनी चाहिए.
बेहतर OpenType Variable Font API
Android 15, OpenType वैरिएबल के फ़ॉन्ट की उपयोगिता को बेहतर बनाता है. आप बना सकते हैं
वेट ऐक्सिस के बारे में बताए बिना, वैरिएबल फ़ॉन्ट का FontFamily
इंस्टेंस
buildVariableFamily
API के साथ इस्तेमाल किया जा सकेगा. टेक्स्ट रेंडरर, दिखाए जा रहे टेक्स्ट से मैच करने के लिए, wght
ऐक्सिस की वैल्यू को बदल देता है.
एपीआई का इस्तेमाल करने से, Typeface
आसानी से बनाया जा सकता है:
Kotlin
val newTypeface = Typeface.CustomFallbackBuilder( FontFamily.Builder( Font.Builder(assets, "RobotoFlex.ttf").build()) .buildVariableFamily()) .build()
Java
Typeface newTypeface = Typeface.CustomFallbackBuilder( new FontFamily.Builder( new Font.Builder(assets, "RobotoFlex.ttf").build()) .buildVariableFamily()) .build();
पहले, इसी Typeface
को बनाने के लिए, आपको ज़्यादा कोड की ज़रूरत होगी:
Kotlin
val oldTypeface = Typeface.CustomFallbackBuilder( FontFamily.Builder( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 400") .setWeight(400) .build()) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 100") .setWeight(100) .build() ) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 200") .setWeight(200) .build() ) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 300") .setWeight(300) .build() ) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 500") .setWeight(500) .build() ) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 600") .setWeight(600) .build() ) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 700") .setWeight(700) .build() ) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 800") .setWeight(800) .build() ) .addFont( Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 900") .setWeight(900) .build() ).build() ).build()
Java
Typeface oldTypeface = new Typeface.CustomFallbackBuilder( new FontFamily.Builder( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 400") .setWeight(400) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 100") .setWeight(100) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 200") .setWeight(200) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 300") .setWeight(300) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 500") .setWeight(500) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 600") .setWeight(600) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 700") .setWeight(700) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 800") .setWeight(800) .build() ) .addFont( new Font.Builder(assets, "RobotoFlex.ttf") .setFontVariationSettings("'wght' 900") .setWeight(900) .build() ) .build() ).build();
यहां एक उदाहरण दिया गया है कि पुराने और नए, दोनों एपीआई का इस्तेमाल करके Typeface
कैसे बनाई गई
रेंडर करता है:
इस उदाहरण में, पुराने एपीआई की मदद से बनाए गए Typeface
में
के लिए सही फ़ॉन्ट वेट बनाने की सुविधा 350, 450, 550 और 650
Font
इंस्टेंस, इसलिए रेंडरर सबसे नज़दीकी वज़न पर वापस चला जाता है. इसलिए, इस मामले में 350 के बजाय 300, 450 के बजाय 400 वगैरह रेंडर किए जाते हैं. इसके उलट, नए एपीआई की मदद से बनाया गया Typeface
डाइनैमिक तौर पर बनाता है
दिए गए वज़न के लिए एक Font
इंस्टेंस, इसलिए 350 के लिए सटीक वेट रेंडर किए जाते हैं,
450, 550, और 650 भी हैं.
लाइन ब्रेक को कंट्रोल करने की बेहतर सुविधा
Starting in Android 15, a TextView
and the underlying
line breaker can preserve the given portion of text in the same line to improve
readability. You can take advantage of this line break customization by using
the <nobreak>
tag in string resources or
createNoBreakSpan
. Similarly, you can preserve words from
hyphenation by using the <nohyphen>
tag or
createNoHyphenationSpan
.
For example, the following string resource doesn't include a line break, and renders with the text "Pixel 8 Pro." breaking in an undesirable place:
<resources>
<string name="pixel8pro">The power and brains behind Pixel 8 Pro.</string>
</resources>
In contrast, this string resource includes the <nobreak>
tag, which wraps the
phrase "Pixel 8 Pro." and prevents line breaks:
<resources>
<string name="pixel8pro">The power and brains behind <nobreak>Pixel 8 Pro.</nobreak></string>
</resources>
The difference in how these strings are rendered is shown in the following images:
<nobreak>
tag.<nobreak>
tag.ऐप्लिकेशन को संग्रहित करना
Android और Google Play ने पिछले साल, ऐप्लिकेशन को संग्रहित करने की सुविधा के बारे में एलान किया था. इसकी मदद से, उपयोगकर्ता अपने डिवाइस में कम इस्तेमाल किए जाने वाले उन ऐप्लिकेशन को हटाकर जगह खाली कर सकते हैं जिन्हें Google Play पर Android ऐप्लिकेशन बंडल का इस्तेमाल करके पब्लिश किया गया था. Android 15 में, ऐप्लिकेशन को संग्रहित करने और संग्रह से हटाने के लिए, ओएस लेवल पर सहायता शामिल है. इससे सभी ऐप स्टोर के लिए, इसे लागू करना आसान हो जाता है.
REQUEST_DELETE_PACKAGES
अनुमति वाले ऐप्लिकेशन, PackageInstaller
requestArchive
तरीके का इस्तेमाल करके, इंस्टॉल किए गए ऐप्लिकेशन पैकेज को संग्रहित करने का अनुरोध कर सकते हैं. इससे APK और कैश मेमोरी में सेव की गई सभी फ़ाइलें हट जाती हैं, लेकिन उपयोगकर्ता का डेटा सेव रहता है. संग्रहित किए गए ऐप्लिकेशन, डिसप्ले करने लायक ऐप्लिकेशन के तौर पर वापस दिखेंगे. इसके लिए,
LauncherApps
एपीआई; उपयोगकर्ताओं को एक यूज़र इंटरफ़ेस (यूआई) दिखेगा, ताकि यह हाइलाइट किया जा सके कि वे
ऐप्लिकेशन संग्रहित किए जाते हैं. अगर कोई उपयोगकर्ता संग्रहित किए गए किसी ऐप्लिकेशन पर टैप करता है, तो ऐप्लिकेशन इंस्टॉल करने वाले व्यक्ति को उसे अनअर्काइव करने का अनुरोध मिलेगा. साथ ही, ऐप्लिकेशन को वापस लाने की प्रोसेस को ACTION_PACKAGE_ADDED
ब्रॉडकास्ट से मॉनिटर किया जा सकता है.
डेवलपर के लिए सेटिंग और टूल का इस्तेमाल करके, किसी डिवाइस पर 16 केबी मोड चालू करना
डिवाइस को 16 केबी मोड में बूट करने के लिए, डेवलपर विकल्प में जाकर 16 केबी पेज साइज़ के साथ बूट करें को टॉगल करें.
Android 15 QPR1 से, डेवलपर विकल्प का इस्तेमाल किया जा सकता है. यह विकल्प, कुछ डिवाइसों पर उपलब्ध होता है. इसकी मदद से, डिवाइस को 16 केबी मोड में बूट किया जा सकता है और डिवाइस पर टेस्टिंग की जा सकती है. डेवलपर के लिए सेटिंग और टूल का इस्तेमाल करने से पहले, सेटिंग > सिस्टम > सॉफ़्टवेयर अपडेट पर जाएं और उपलब्ध अपडेट लागू करें.
डेवलपर के लिए उपलब्ध यह विकल्प, इन डिवाइसों पर उपलब्ध है:
Pixel 8 और 8 Pro (Android 15 QPR1 या उसके बाद के वर्शन के साथ)
Pixel 8a (Android 15 QPR1 या इसके बाद के वर्शन के साथ)
Pixel 9, 9 Pro, और 9 Pro XL (Android 15 QPR2 Beta 2 या इसके बाद के वर्शन के साथ)
ग्राफ़िक्स
Android 15 में, ग्राफ़िक्स को बेहतर बनाने के लिए नए अपडेट किए गए हैं. इनमें ANGLE और Canvas ग्राफ़िक्स सिस्टम में किए गए बदलाव शामिल हैं.
Android में जीपीयू ऐक्सेस करने की सुविधा को बेहतर बनाना
Android hardware has evolved quite a bit from the early days where the core OS would run on a single CPU and GPUs were accessed using APIs based on fixed-function pipelines. The Vulkan® graphics API has been available in the NDK since Android 7.0 (API level 24) with a lower-level abstraction that better reflects modern GPU hardware, scales better to support multiple CPU cores, and offers reduced CPU driver overhead — leading to improved app performance. Vulkan is supported by all modern game engines.
Vulkan is Android's preferred interface to the GPU. Therefore, Android 15 includes ANGLE as an optional layer for running OpenGL® ES on top of Vulkan. Moving to ANGLE will standardize the Android OpenGL implementation for improved compatibility, and, in some cases, improved performance. You can test out your OpenGL ES app stability and performance with ANGLE by enabling the developer option in Settings -> System -> Developer Options -> Experimental: Enable ANGLE on Android 15.
The Android ANGLE on Vulkan roadmap
As part of streamlining our GPU stack, going forward we will be shipping ANGLE as the GL system driver on more new devices, with the future expectation that OpenGL/ES will be only available through ANGLE. That being said, we plan to continue support for OpenGL ES on all devices.
Recommended next steps
Use the developer options to select the ANGLE driver for OpenGL ES and test your app. For new projects, we strongly encourage using Vulkan for C/C++.
कैनवस के लिए किए गए सुधार
Android 15 continues our modernization of Android's Canvas graphics system with additional capabilities:
Matrix44
provides a 4x4 matrix for transforming coordinates that should be used when you want to manipulate the canvas in 3D.clipShader
intersects the current clip with the specified shader, whileclipOutShader
sets the clip to the difference of the current clip and the shader, each treating the shader as an alpha mask. This supports the drawing of complex shapes efficiently.
परफ़ॉर्मेंस और बैटरी
Android, आपके ऐप्लिकेशन की परफ़ॉर्मेंस और क्वालिटी को बेहतर बनाने में आपकी मदद करता रहेगा. Android 15 में ऐसे एपीआई पेश किए गए हैं जो आपके ऐप्लिकेशन में टास्क को ज़्यादा असरदार तरीके से पूरा करने, ऐप्लिकेशन की परफ़ॉर्मेंस को ऑप्टिमाइज़ करने, और अपने ऐप्लिकेशन के बारे में अहम जानकारी इकट्ठा करने में मदद करते हैं.
बैटरी की खपत कम करने के सबसे सही तरीके, नेटवर्क और बैटरी के इस्तेमाल से जुड़ी गड़बड़ियों को ठीक करने, और Android 15 और Android के हाल ही के वर्शन में बैकग्राउंड में होने वाले काम के लिए बैटरी की खपत कम करने के बारे में ज़्यादा जानकारी पाने के लिए, Google I/O में हुई Android पर बैकग्राउंड में होने वाले काम के लिए बैटरी की खपत कम करना टॉक देखें.
ApplicationStartInfo API
In previous versions of Android, app startup has been a bit of a mystery. It was
challenging to determine within your app whether it started from a cold, warm,
or hot state. It was also difficult to know how long your app spent during the
various launch phases: forking the process, calling onCreate
, drawing the
first frame, and more. When your Application
class was instantiated, you had no
way of knowing whether the app started from a broadcast, a content provider, a
job, a backup, boot complete, an alarm, or an Activity
.
The ApplicationStartInfo
API on Android 15 provides
all of this and more. You can even choose to add your own timestamps into the
flow to help collect timing data in one place. In addition to collecting
metrics, you can use ApplicationStartInfo
to help directly optimize app
startup; for example, you can eliminate the costly instantiation of UI-related
libraries within your Application
class when your app is starting up due to a
broadcast.
ऐप्लिकेशन के साइज़ के बारे में ज़्यादा जानकारी
Since Android 8.0 (API level 26), Android has included the
StorageStats.getAppBytes
API that summarizes the installed
size of an app as a single number of bytes, which is a sum of the APK size, the
size of files extracted from the APK, and files that were generated on the
device such as ahead-of-time (AOT) compiled code. This number is not very
insightful in terms of how your app is using storage.
Android 15 adds the
StorageStats.getAppBytesByDataType([type])
API, which lets
you get insight into how your app is using up all that space, including APK file
splits, AOT and speedup related code, dex metadata, libraries, and guided
profiles.
ऐप्लिकेशन के ज़रिए मैनेज की जाने वाली प्रोफ़ाइलिंग
Android 15 includes the ProfilingManager
class,
which lets you collect profiling information from within your app such as heap
dumps, heap profiles, stack sampling, and more. It provides a callback to your
app with a supplied tag to identify the output file, which is delivered to your
app's files directory. The API does rate limiting to minimize the performance
impact.
To simplify constructing profiling requests in your app, we recommend using the
corresponding Profiling
AndroidX API, available
in Core 1.15.0-rc01 or higher.
SQLite डेटाबेस में सुधार
Android 15 में SQLite एपीआई उपलब्ध कराए गए हैं, जो इसमें मौजूद SQLite इंजन, जो परफ़ॉर्मेंस की उन समस्याओं को टारगेट करता है जो मेनिफ़ेस्ट करते हैं. ये एपीआई SQLite के अपडेट को वर्शन में शामिल करते हैं 3.44.3.
डेवलपर को अपने SQLite डेटाबेस का ज़्यादा से ज़्यादा फ़ायदा पाने के लिए, SQLite की परफ़ॉर्मेंस के लिए सबसे सही तरीकों के बारे में जानना चाहिए. ऐसा खास तौर पर, बड़े डेटाबेस के साथ काम करते समय या इंतज़ार का समय कम करने वाली क्वेरी चलाते समय ज़रूरी है.
- रीड-ओनली डेफ़र्ड ट्रांज़ैक्शन: रीड-ओनली ट्रांज़ैक्शन जारी करते समय (लिखने के स्टेटमेंट शामिल न करें), रीड-ओनली
DEFERRED
ट्रांज़ैक्शन जारी करने के लिए,beginTransactionReadOnly()
औरbeginTransactionWithListenerReadOnly(SQLiteTransactionListener)
का इस्तेमाल करें. ऐसे लेन-देन चलाए जा सकते हैं और डेटाबेस के WAL मोड में होने पर, ये दोनों काम कर सकते हैंIMMEDIATE
याEXCLUSIVE
लेन-देन के साथ चलाए जाते हैं. - लाइन की संख्या और आईडी: एपीआई जोड़े गए हैं, ताकि बदली गई लाइनों की संख्या या डाली गई आखिरी लाइन का आईडी, अतिरिक्त क्वेरी जारी किए बिना वापस पाया जा सके.
getLastChangedRowCount()
, मौजूदा ट्रांज़ैक्शन में सबसे हाल ही के एसक्यूएल स्टेटमेंट की मदद से डाली गई, अपडेट की गई या मिटाई गई पंक्तियों की संख्या दिखाता है. वहीं,getTotalChangedRowCount()
, मौजूदा कनेक्शन की गिनती दिखाता है.getLastInsertRowId()
, आखिरी पंक्ति काrowid
दिखाता है को चालू करने के लिए किया जा सकता है. - रॉ स्टेटमेंट: रॉ SQlite स्टेटमेंट जारी करें. इससे, सुविधाजनक रैपर और प्रोसेसिंग के लिए होने वाले अतिरिक्त खर्च से बचा जा सकता है.
Android Dynamic Performance Framework से जुड़े अपडेट
Android 15 में, हमने Android डाइनैमिक परफ़ॉर्मेंस फ़्रेमवर्क (ADPF) पर काम करना जारी रखा है. यह एपीआई का एक सेट है, जो गेम और बेहतर परफ़ॉर्मेंस वाले ऐप्लिकेशन को Android डिवाइसों के पावर और थर्मल सिस्टम के साथ सीधे तौर पर इंटरैक्ट करने की अनुमति देता है. Android 15, काम करने वाले डिवाइसों पर ADPF की सुविधाएं जोड़ता है:
- हिंट सेशन के लिए पावर-इफ़िशिएंस मोड, ताकि यह पता चल सके कि उनसे जुड़ी थ्रेड को परफ़ॉर्मेंस के बजाय, पावर सेव करने को प्राथमिकता देनी चाहिए. यह मोड, लंबे समय तक चलने वाले बैकग्राउंड वर्कलोड के लिए बेहतर है.
- जीपीयू और सीपीयू के काम करने की अवधि, दोनों को हिंट सेशन में रिपोर्ट किया जा सकता है. इससे सिस्टम, सीपीयू और जीपीयू की फ़्रीक्वेंसी को एक साथ अडजस्ट कर सकता है, ताकि वर्कलोड की ज़रूरतों को बेहतर तरीके से पूरा किया जा सके.
- थर्मल हेडरूम थ्रेशोल्ड, ताकि हेडरूम के अनुमान के आधार पर, थर्मल थ्रॉटलिंग की संभावित स्थिति का पता लगाया जा सके.
अपने ऐप्लिकेशन और गेम में ADPF का इस्तेमाल करने के तरीके के बारे में ज़्यादा जानने के लिए, दस्तावेज़ पर जाएं.
निजता
Android 15 में कई ऐसी सुविधाएं शामिल हैं जिनसे ऐप्लिकेशन डेवलपर को उपयोगकर्ता की निजता को सुरक्षित रखने में मदद मिलती है.
स्क्रीन रिकॉर्डिंग का पता लगाने की सुविधा
Android 15 में ऐप्लिकेशन के लिए सहायता जोड़ी गई है, ताकि यह पता लगाया जा सके कि उन्हें रिकॉर्ड किया जा रहा है. ऐप्लिकेशन के ट्रांज़िशन होने पर, कॉलबैक शुरू हो जाता है के बीच फ़र्क़ पड़ता है. अगर रजिस्टर करने की प्रोसेस के UID के मालिकाना हक वाली गतिविधियां रिकॉर्ड की जा रही हैं, तो ऐप्लिकेशन को दिखने वाला माना जाता है. इस तरह से, अगर आपका ऐप्लिकेशन संवेदनशील कार्रवाई करता है, तो उपयोगकर्ता को बता सकता है कि उन्हें रिकॉर्ड किया जा रहा है.
val mCallback = Consumer<Int> { state ->
if (state == SCREEN_RECORDING_STATE_VISIBLE) {
// We're being recorded
} else {
// We're not being recorded
}
}
override fun onStart() {
super.onStart()
val initialState =
windowManager.addScreenRecordingCallback(mainExecutor, mCallback)
mCallback.accept(initialState)
}
override fun onStop() {
super.onStop()
windowManager.removeScreenRecordingCallback(mCallback)
}
IntentFilter की बेहतर सुविधाएं
Android 15 में, UriRelativeFilterGroup
के ज़रिए Intent
को ज़्यादा सटीक तरीके से हल करने की सुविधा पहले से मौजूद है. इसमें UriRelativeFilter
ऑब्जेक्ट का एक सेट होता है, जो Intent
मैच करने वाले नियमों का एक सेट बनाता है. इन नियमों को पूरा करना ज़रूरी है. इनमें यूआरएल क्वेरी पैरामीटर, यूआरएल फ़्रैगमेंट, और ब्लॉक करने या बाहर रखने के नियम शामिल हैं.
इन नियमों को AndroidManifest
एक्सएमएल फ़ाइल में, <uri-relative-filter-group>
टैग की मदद से तय किया जा सकता है. इसमें android:allow
टैग भी शामिल किया जा सकता है. इन टैग में ऐसे <data>
टैग शामिल हो सकते हैं जिनमें मौजूदा डेटा टैग एट्रिब्यूट के साथ-साथ, android:query
और android:fragment
एट्रिब्यूट का इस्तेमाल किया जाता है.
यहां AndroidManifest
सिंटैक्स का एक उदाहरण दिया गया है:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="astore.com" />
<uri-relative-filter-group>
<data android:pathPrefix="/auth" />
<data android:query="region=na" />
</uri-relative-filter-group>
<uri-relative-filter-group android:allow="false">
<data android:pathPrefix="/auth" />
<data android:query="mobileoptout=true" />
</uri-relative-filter-group>
<uri-relative-filter-group android:allow="false">
<data android:pathPrefix="/auth" />
<data android:fragmentPrefix="faq" />
</uri-relative-filter-group>
</intent-filter>
प्राइवेट स्पेस
Private space lets users create a separate space on their device where they can keep sensitive apps away from prying eyes, under an additional layer of authentication. The private space uses a separate user profile. The user can choose to use the device lock or a separate lock factor for the private space.
Apps in the private space show up in a separate container in the launcher, and are hidden from the recents view, notifications, settings, and from other apps when the private space is locked. User-generated and downloaded content (such as media or files) and accounts are separated between the private space and the main space. The system sharesheet and the photo picker can be used to give apps access to content across spaces when the private space is unlocked.
Users can't move existing apps and their data into the private space. Instead, users select an install option in the private space to install an app using whichever app store they prefer. Apps in the private space are installed as separate copies from any apps in the main space (new copies of the same app).
When a user locks the private space, the profile is stopped. While the profile is stopped, apps in the private space are no longer active and can't perform foreground or background activities, including showing notifications.
We recommend that you test your app with private space to make sure your app works as expected, especially if your app falls into one of the following categories:
- Apps with logic for work profiles that assumes that any installed copies of their app that aren't in the main profile are in the work profile.
- Medical apps
- Launcher apps
- App store apps
'चुनिंदा फ़ोटो का ऐक्सेस' के लिए, उपयोगकर्ता के सबसे हाल ही के चुने गए विकल्प के बारे में क्वेरी करना
Apps can now highlight only the most-recently-selected photos and videos when
partial access to media permissions is granted. This feature can improve
the user experience for apps that frequently request access to photos and
videos. To use this feature in your app, enable the
QUERY_ARG_LATEST_SELECTION_ONLY
argument when querying MediaStore
through ContentResolver
.
Kotlin
val externalContentUri = MediaStore.Files.getContentUri("external") val mediaColumns = arrayOf( FileColumns._ID, FileColumns.DISPLAY_NAME, FileColumns.MIME_TYPE, ) val queryArgs = bundleOf( // Return only items from the last selection (selected photos access) QUERY_ARG_LATEST_SELECTION_ONLY to true, // Sort returned items chronologically based on when they were added to the device's storage QUERY_ARG_SQL_SORT_ORDER to "${FileColumns.DATE_ADDED} DESC", QUERY_ARG_SQL_SELECTION to "${FileColumns.MEDIA_TYPE} = ? OR ${FileColumns.MEDIA_TYPE} = ?", QUERY_ARG_SQL_SELECTION_ARGS to arrayOf( FileColumns.MEDIA_TYPE_IMAGE.toString(), FileColumns.MEDIA_TYPE_VIDEO.toString() ) )
Java
Uri externalContentUri = MediaStore.Files.getContentUri("external"); String[] mediaColumns = { FileColumns._ID, FileColumns.DISPLAY_NAME, FileColumns.MIME_TYPE }; Bundle queryArgs = new Bundle(); queryArgs.putBoolean(MediaStore.QUERY_ARG_LATEST_SELECTION_ONLY, true); queryArgs.putString(MediaStore.QUERY_ARG_SQL_SORT_ORDER, FileColumns.DATE_ADDED + " DESC"); queryArgs.putString(MediaStore.QUERY_ARG_SQL_SELECTION, FileColumns.MEDIA_TYPE + " = ? OR " + FileColumns.MEDIA_TYPE + " = ?"); queryArgs.putStringArray(MediaStore.QUERY_ARG_SQL_SELECTION_ARGS, new String[] { String.valueOf(FileColumns.MEDIA_TYPE_IMAGE), String.valueOf(FileColumns.MEDIA_TYPE_VIDEO) });
Android पर Privacy Sandbox
Android 15 includes the latest Android Ad Services extensions, incorporating the latest version of the Privacy Sandbox on Android. This addition is part of our work to develop technologies that improve user privacy and enable effective, personalized advertising experiences for mobile apps. Our privacy sandbox page has more information about the Privacy Sandbox on Android developer preview and beta programs to help you get started.
Health Connect
Android 15 integrates the latest extensions around Health Connect by Android, a secure and centralized platform to manage and share app-collected health and fitness data. This update adds support for additional data types across fitness, nutrition, skin temperature, training plans, and more.
Skin temperature tracking allows users to store and share more accurate temperature data from a wearable or other tracking device.
Training plans are structured workout plans to help a user achieve their fitness goals. Training plans support includes a variety of completion and performance goals:
- Completion goals around calories burned, distance, duration, repetition, and steps.
- Performance goals around as many repetitions as possible (AMRAP), cadence, heart rate, power, perceived rate of exertion, and speed.
Learn more about the latest updates to Health Connect in Android in the Building adaptable experiences with Android Health talk from Google I/O.
ऐप्लिकेशन की स्क्रीन शेयर करने की सुविधा
Android 15 supports app screen sharing so users can share or record just an
app window rather than the entire device screen. This feature, first enabled in
Android 14 QPR2, includes
MediaProjection
callbacks that allow your app
to customize the app screen sharing experience. Note that for apps targeting
Android 14 (API level 34) or higher,
user consent is required for each
MediaProjection
capture session.
उपयोगकर्ता अनुभव और सिस्टम यूज़र इंटरफ़ेस (यूआई)
Android 15 में, ऐप्लिकेशन डेवलपर और उपयोगकर्ताओं को अपने डिवाइस को अपनी ज़रूरतों के हिसाब से कॉन्फ़िगर करने के लिए, ज़्यादा कंट्रोल और सुविधा मिलती है.
Android 15 में किए गए नए सुधारों का इस्तेमाल करके, अपने ऐप्लिकेशन पर लोगों को बेहतर अनुभव देने के बारे में ज़्यादा जानने के लिए, Google I/O में हुई अपने Android ऐप्लिकेशन पर लोगों को बेहतर अनुभव देना बातचीत देखें.
Generated Previews API की मदद से, विजेट की बेहतर झलकें
Android 15 से पहले, विजेट पिकर की झलक दिखाने का सिर्फ़ एक ही तरीका था. इसके लिए, स्टैटिक इमेज या लेआउट रिसॉर्स तय करना होता था. होम स्क्रीन पर विजेट को जोड़ने पर, ये झलकें अक्सर असल विजेट से काफ़ी अलग दिखती हैं. साथ ही, Jetpack Glance की मदद से स्टैटिक रिसॉर्स नहीं बनाए जा सकते. इसलिए, Glance के डेवलपर को विजेट की झलक देखने के लिए, अपने विजेट का स्क्रीनशॉट लेना पड़ता था या एक्सएमएल लेआउट बनाना पड़ता था.
Android 15 में, जनरेट की गई झलक देखने की सुविधा जोड़ी गई. इसका मतलब है कि ऐप्लिकेशन विजेट की सेवा देने वाली कंपनियां, स्टैटिक संसाधन के बजाय, पिकर की झलक के तौर पर इस्तेमाल करने के लिए RemoteViews
जनरेट कर सकती हैं.
Push API
ऐप्लिकेशन, पुश एपीआई की मदद से जनरेट की गई झलकियां दिखा सकते हैं. ऐप्लिकेशन, अपने लाइफ़साइकल के किसी भी समय झलक दिखा सकते हैं. इसके लिए, उन्हें होस्ट से झलक दिखाने का अनुरोध नहीं करना पड़ता. झलकें AppWidgetService
में सेव रहती हैं. होस्ट, मांग पर इनका अनुरोध कर सकते हैं. इस उदाहरण में, एक्सएमएल विजेट लेआउट संसाधन लोड किया गया है और उसे झलक के तौर पर सेट किया गया है:
AppWidgetManager.getInstance(appContext).setWidgetPreview(
ComponentName(
appContext,
SociaLiteAppWidgetReceiver::class.java
),
AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
RemoteViews("com.example", R.layout.widget_preview)
)
इसका अनुमानित फ़्लो यह होता है:
- विजेट की सेवा देने वाली कंपनी किसी भी समय
setWidgetPreview
को कॉल कर सकती है. दी गई झलकें,AppWidgetService
में सेवा देने वाली कंपनी की अन्य जानकारी के साथ सेव की जाती हैं. setWidgetPreview
,AppWidgetHost.onProvidersChanged
कॉलबैक की मदद से, होस्ट को अपडेट की गई झलक की सूचना देता है. इसके जवाब में, विजेट होस्ट, सेवा देने वाली कंपनी की सारी जानकारी को फिर से लोड करता है.- विजेट की झलक दिखाते समय, होस्ट
AppWidgetProviderInfo.generatedPreviewCategories
की जांच करता है. अगर चुनी गई कैटगरी उपलब्ध है, तो इस सेवा देने वाली कंपनी के लिए सेव की गई झलक दिखाने के लिए,AppWidgetManager.getWidgetPreview
को कॉल किया जाता है.
setWidgetPreview
को कब कॉल करें
झलक दिखाने के लिए कोई कॉलबैक नहीं है. इसलिए, ऐप्लिकेशन किसी भी समय झलक भेज सकते हैं. झलक को कितनी बार अपडेट करना है, यह इस बात पर निर्भर करता है कि विजेट का इस्तेमाल किस तरह से किया जा रहा है.
यहां दी गई सूची में, झलक के इस्तेमाल के उदाहरणों की दो मुख्य कैटगरी के बारे में बताया गया है:
- सेवा देने वाली ऐसी कंपनियां जो अपने विजेट की झलक में असली डेटा दिखाती हैं, जैसे कि आपके हिसाब से बनाई गई या हाल की जानकारी. उपयोगकर्ता के साइन इन करने या अपने ऐप्लिकेशन में शुरुआती कॉन्फ़िगरेशन करने के बाद, ये सेवा देने वाली कंपनियां झलक सेट कर सकती हैं. इसके बाद, वे अपने चुने गए समय पर झलक को अपडेट करने के लिए, समय-समय पर होने वाला टास्क सेट अप कर सकती हैं. इस तरह के विजेट के उदाहरणों में फ़ोटो, कैलेंडर, मौसम या खबरों का विजेट शामिल हो सकता है.
- ऐसे प्रॉवाइडर जो झलक या क्विक ऐक्शन विजेट में स्टैटिक जानकारी दिखाते हैं और कोई डेटा नहीं दिखाते. ये कंपनियां, ऐप्लिकेशन के पहली बार लॉन्च होने पर, झलक को एक बार सेट कर सकती हैं. इस तरह के विजेट के उदाहरणों में, Drive की तुरंत कार्रवाइयों वाला विजेट या Chrome के शॉर्टकट विजेट शामिल हैं.
हो सकता है कि कुछ सेवा देने वाली कंपनियां, हब मोड पिकर पर स्टैटिक झलक दिखाएं, लेकिन होमस्क्रीन पिकर पर असल जानकारी दिखाएं. इन सेवा देने वाली कंपनियों को, झलक सेट करने के लिए, इस्तेमाल के इन दोनों उदाहरणों के लिए दिशा-निर्देशों का पालन करना चाहिए.
पिक्चर में पिक्चर
Android 15 introduces changes in Picture-in-Picture (PiP) ensuring an even smoother transition when entering into PiP mode. This will be beneficial for apps having UI elements overlaid on top of their main UI, which goes into PiP.
Developers use the onPictureInPictureModeChanged
callback to define logic
that toggles the visibility of the overlaid UI elements. This callback is
triggered when the PiP enter or exit animation is completed. Beginning in
Android 15, the PictureInPictureUiState
class includes another state.
With this UI state, apps targeting Android 15 (API level 35) will observe the
Activity#onPictureInPictureUiStateChanged
callback being invoked with
isTransitioningToPip()
as soon as the PiP animation starts. There are
many UI elements that are not relevant for the app when it is in PiP mode, for
example views or layout that include information such as suggestions, upcoming
video, ratings, and titles. When the app goes to PiP mode, use the
onPictureInPictureUiStateChanged
callback to hide these UI elements. When the
app goes to full screen mode from the PiP window, use
onPictureInPictureModeChanged
callback to unhide these elements, as shown in
the following examples:
override fun onPictureInPictureUiStateChanged(pipState: PictureInPictureUiState) {
if (pipState.isTransitioningToPip()) {
// Hide UI elements
}
}
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
if (isInPictureInPictureMode) {
// Unhide UI elements
}
}
This quick visibility toggle of irrelevant UI elements (for a PiP window) helps ensure a smoother and flicker-free PiP enter animation.
'परेशान न करें' सुविधा के बेहतर नियम
AutomaticZenRule
की मदद से ऐप्लिकेशन, 'ध्यान दें' सुविधा को अपनी पसंद के मुताबिक बना सकते हैं
मैनेजमेंट (परेशान न करें) के नियम और तय करें कि इन्हें कब चालू या बंद करना है
उन्हें. Android 15, इन नियमों को बेहतर तरीके से दिखाता है. ऐसा करने का मकसद,
उपयोगकर्ता अनुभव मिलता है. इसमें ये बदलाव शामिल हैं:
AutomaticZenRule
में टाइप जोड़े जा रहे हैं. इससे सिस्टम, खास वैल्यू लागू कर सकता है कुछ नियम-कानूनों के बारे में बताता है.AutomaticZenRule
में आइकॉन जोड़ा जा रहा है. इससे मोड बेहतर तरीके से काम करेगा पहचानने लायक.AutomaticZenRule
में ऐसीtriggerDescription
स्ट्रिंग जोड़ी जा रही है जो यह बताए ऐसी शर्तें जिनके आधार पर, उपयोगकर्ता के लिए नियम चालू होना चाहिए.- जोड़े गए
ZenDeviceEffects
सेAutomaticZenRule
तक, जिससे नियम ग्रेस्केल जैसी चीज़ों को ट्रिगर कर सकेंगे वॉलपेपर की रोशनी कम करने के लिए भी किया जा सकता है.
सूचना चैनलों के लिए VibrationEffect सेट करना
Android 15 supports setting rich vibrations for incoming notifications by
channel using NotificationChannel.setVibrationEffect
, so
your users can distinguish between different types of notifications without
having to look at their device.
मीडिया प्रोजेक्शन की स्थिति दिखाने वाली स्टेटस बार चिप और अपने-आप बंद होने की सुविधा
मीडिया प्रोजेक्शन की सुविधा से, उपयोगकर्ता की निजी जानकारी सार्वजनिक हो सकती है. एक नया और प्रमुख स्टेटस बार चिप, उपयोगकर्ताओं को स्क्रीन पर चल रहे प्रोजेक्शन के बारे में बताता है. स्क्रीन को कास्ट करने, शेयर करने या रिकॉर्ड करने की सुविधा बंद करने के लिए, उपयोगकर्ता चिप पर टैप कर सकते हैं. साथ ही, बेहतर उपयोगकर्ता अनुभव के लिए, डिवाइस की स्क्रीन लॉक होने पर, स्क्रीन पर चल रहा प्रोजेक्शन अपने-आप बंद हो जाता है.
बड़ी स्क्रीन और फ़ॉर्म फ़ैक्टर
Android 15, आपके ऐप्लिकेशन को Android के फ़ॉर्म फ़ैक्टर का ज़्यादा से ज़्यादा फ़ायदा पाने में मदद करता है. इनमें बड़ी स्क्रीन, फ़्लिप किए जा सकने वाले डिवाइस, और फ़ोल्ड किए जा सकने वाले डिवाइस शामिल हैं.
बड़ी स्क्रीन पर मल्टीटास्किंग की बेहतर सुविधा
Android 15 gives users better ways to multitask on large screen devices. For example, users can save their favorite split-screen app combinations for quick access and pin the taskbar on screen to quickly switch between apps. This means that making sure your app is adaptive is more important than ever.
Google I/O has sessions on Building adaptive Android apps and Building UI with the Material 3 adaptive library that can help, and our documentation has more to help you Design for large screens.
कवर स्क्रीन पर काम करने की सुविधा
Your app can declare a property that Android 15 uses to
allow your Application
or Activity
to be presented on the small cover
screens of supported flippable devices. These screens are too small to be
considered as compatible targets for Android apps to run on, but your app can
opt in to supporting them, making your app available in more places.
कनेक्टिविटी
Android 15, प्लैटफ़ॉर्म को अपडेट करता है, ताकि आपके ऐप्लिकेशन को कम्यूनिकेशन और वायरलेस टेक्नोलॉजी के नए वर्शन का ऐक्सेस मिल सके.
सैटलाइट की मदद से मैसेज भेजने की सुविधा
Android 15 का इस्तेमाल करने पर, सैटलाइट कनेक्टिविटी के लिए प्लैटफ़ॉर्म की सुविधा लगातार मिलती रहेगी. इसमें कुछ यूज़र इंटरफ़ेस (यूआई) एलिमेंट शामिल हैं, ताकि पूरे पेज पर एक जैसा उपयोगकर्ता अनुभव दिया जा सके सैटलाइट कनेक्टिविटी लैंडस्केप.
ऐप्लिकेशन, ServiceState.isUsingNonTerrestrialNetwork()
का इस्तेमाल करके यह पता लगा सकते हैं कि कोई डिवाइस सैटलाइट से कब कनेक्ट है. इससे उन्हें यह जानकारी मिलती है कि नेटवर्क की सभी सेवाएं उपलब्ध न होने की वजह क्या हो सकती है. साथ ही, Android 15
एसएमएस और मल्टीमीडिया मैसेज (एमएमएस) ऐप्लिकेशन के साथ-साथ, पहले से लोड किए गए आरसीएस ऐप्लिकेशन को इस्तेमाल करने की सुविधा देता है
मैसेज भेजने और पाने के लिए सैटलाइट कनेक्टिविटी की सुविधा.
एनएफ़सी की सुविधा का बेहतर अनुभव
Android 15 is working to make the tap to pay experience more seamless and
reliable while continuing to support Android's robust NFC app ecosystem. On
supported devices, apps can request the NfcAdapter
to enter
observe mode, where the device listens but doesn't respond to NFC
readers, sending the app's NFC service PollingFrame
objects to process. The PollingFrame
objects can be used to auth
ahead of the first communication to the NFC reader, allowing for a one tap
transaction in many cases.
In addition, apps can register a filter on supported devices so they can be notified of polling loop activity, which allows for smooth operation with multiple NFC-aware applications.
Wallet की भूमिका
Android 15 में Wallet की भूमिका को शामिल किया गया है. इससे, उपयोगकर्ता के पसंदीदा Wallet ऐप्लिकेशन के साथ बेहतर तरीके से इंटिग्रेशन किया जा सकता है. यह भूमिका, एनएफ़सी की डिफ़ॉल्ट तौर पर सेट की गई, टच किए बिना पेमेंट करने की सेटिंग की जगह ले लेती है. उपयोगकर्ता, सेटिंग > ऐप्लिकेशन > डिफ़ॉल्ट ऐप्लिकेशन पर जाकर, Wallet में भूमिका रखने वाले व्यक्ति को मैनेज कर सकते हैं.
Wallet की भूमिका का इस्तेमाल, पेमेंट कैटगरी में रजिस्टर किए गए एआईडी के लिए एनएफ़सी टैप को रूट करते समय किया जाता है. टैप हमेशा Wallet की भूमिका वाले व्यक्ति को भेजे जाते हैं. ऐसा तब तक होता है, जब तक उसी AID के लिए रजिस्टर किया गया कोई दूसरा ऐप्लिकेशन फ़ोरग्राउंड में नहीं चल रहा होता.
इस भूमिका का इस्तेमाल यह तय करने के लिए भी किया जाता है कि चालू होने पर, Wallet की क्विक ऐक्सेस टाइल कहां दिखे. जब भूमिका "कोई नहीं" पर सेट होती है, तो क्विक ऐक्सेस टाइल उपलब्ध नहीं होती और पेमेंट कैटगरी के एनएफ़सी टैप सिर्फ़ फ़ोरग्राउंड ऐप्लिकेशन पर डिलीवर किए जाते हैं.
सुरक्षा
Android 15 की मदद से, अपने ऐप्लिकेशन की सुरक्षा को बेहतर बनाया जा सकता है. साथ ही, ऐप्लिकेशन के डेटा को सुरक्षित रखा जा सकता है. इसके अलावा, उपयोगकर्ताओं को उनके डेटा के बारे में ज़्यादा जानकारी दी जा सकती है और उन्हें डेटा पर ज़्यादा कंट्रोल दिया जा सकता है. उपयोगकर्ताओं की सुरक्षा को बेहतर बनाने और आपके ऐप्लिकेशन को नए खतरों से बचाने के लिए, हम क्या कर रहे हैं, इस बारे में ज़्यादा जानने के लिए, Google I/O में Android पर उपयोगकर्ताओं की सुरक्षा करना टॉक देखें.
Credential Manager को ऑटोमैटिक भरने की सुविधा के साथ इंटिग्रेट करना
Android 15 से, डेवलपर क्रेडेंशियल मैनेजर के अनुरोधों के साथ, उपयोगकर्ता नाम या पासवर्ड फ़ील्ड जैसे खास व्यू को लिंक कर सकते हैं. इससे, साइन-इन की प्रोसेस के दौरान उपयोगकर्ता को बेहतर अनुभव देना आसान हो जाता है. जब उपयोगकर्ता इनमें से किसी एक व्यू पर फ़ोकस करता है, तो उससे जुड़ा अनुरोध क्रेडेंशियल मैनेजर को भेजा जाता है. इस प्रोसेस से मिले क्रेडेंशियल, सभी सेवा देने वाली कंपनियों के साथ इकट्ठा किए जाते हैं और ऑटोमैटिक भरने की सुविधा के फ़ॉलबैक यूज़र इंटरफ़ेस (यूआई) में दिखाए जाते हैं. जैसे, इनलाइन सुझाव या ड्रॉप-डाउन सुझाव. डेवलपर के लिए, Jetpack androidx.credentials लाइब्रेरी का इस्तेमाल करना सबसे बेहतर है. यह लाइब्रेरी, Android 15 और इसके बाद के वर्शन में इस सुविधा को बेहतर बनाने के लिए जल्द ही उपलब्ध होगी.
बायोमेट्रिक प्रॉम्प्ट के साथ, एक टैप में साइन-अप और साइन-इन करने की सुविधा को इंटिग्रेट करना
Credential Manager integrates biometric prompts into the credential creation and sign-in processes, eliminating the need for providers to manage biometric prompts. As a result, credential providers only need to focus on the results of the create and get flows, augmented with the biometric flow result. This simplified process creates a more efficient and streamlined credential creation and retrieval process.
एंड-टू-एंड एन्क्रिप्शन के लिए कुंजी मैनेजमेंट
हम Android 15 में E2eeContactKeysManager
को लॉन्च कर रहे हैं. इससे आपके Android ऐप्लिकेशन में एंड-टू-एंड एन्क्रिप्शन (E2EE) की सुविधा मिलती है. इसके लिए, क्रिप्टोग्राफ़िक सार्वजनिक कुंजियों को सेव करने के लिए, ओएस-लेवल का एपीआई उपलब्ध कराया जाता है.
E2eeContactKeysManager
को प्लैटफ़ॉर्म के संपर्क ऐप्लिकेशन के साथ इंटिग्रेट करने के लिए डिज़ाइन किया गया है. इससे उपयोगकर्ताओं को अपने संपर्कों के सार्वजनिक कुंजियों को मैनेज करने और उनकी पुष्टि करने का एक ही तरीका मिलता है.
कॉन्टेंट यूआरआई पर अनुमतियों की जांच करना
Android 15 में ऐसे एपीआई का एक सेट शामिल किया गया है जो कॉन्टेंट के यूआरआई पर अनुमति की जांच करते हैं:
Context.checkContentUriPermissionFull
: यह कॉन्टेंट यूआरआई पर अनुमति की पूरी जांच करता है.Activity
मेनिफ़ेस्ट एट्रिब्यूटrequireContentUriPermissionFromCaller
: यह गतिविधि शुरू होने पर, दिए गए कॉन्टेंट यूआरआई पर तय की गई अनुमतियां लागू करता है.Activity
कॉलर के लिएComponentCaller
क्लास: यह उस ऐप्लिकेशन को दिखाता है जिसने गतिविधि शुरू की.
सुलभता
Android 15 में, उपयोगकर्ताओं के लिए ऐक्सेसिबिलिटी को बेहतर बनाने वाली सुविधाएं जोड़ी गई हैं.
ब्रेल की सुविधा को बेहतर बनाया गया
In Android 15, we've made it possible for TalkBack to support Braille displays that are using the HID standard over both USB and secure Bluetooth.
This standard, much like the one used by mice and keyboards, will help Android support a wider range of Braille displays over time.
इंटरनैशनलाइज़ेशन
Android 15 में ऐसी सुविधाएं जोड़ी गई हैं जो अलग-अलग भाषाओं में डिवाइस इस्तेमाल करने पर, उपयोगकर्ता अनुभव को बेहतर बनाती हैं.
सीजेके वैरिएबल फ़ॉन्ट
Starting with Android 15, the font file for Chinese, Japanese, and Korean (CJK) languages, NotoSansCJK, is now a variable font. Variable fonts open up possibilities for creative typography in CJK languages. Designers can explore a broader range of styles and create visually striking layouts that were previously difficult or impossible to achieve.
अक्षरों के बीच में स्पेस को सही ठहराना
Android 15 से, JUSTIFICATION_MODE_INTER_CHARACTER
का इस्तेमाल करके, अक्षरों के बीच के स्पेस का इस्तेमाल करके टेक्स्ट को अलाइन किया जा सकता है. एक ही शब्द में दो बार सही ठहराने की वजह यह थी
पहली बार Android 8.0 (एपीआई लेवल 26) और इंटर-कैरेक्टर में पेश किया गया था
वजह बताने की सुविधा, उन भाषाओं के लिए समान सुविधाएं देती है जो
चाइनीज़, जैपनीज़ वगैरह जैसे सेगमेंटेशन के लिए खाली सफ़ेद जगह.
JUSTIFICATION_MODE_NONE
का इस्तेमाल करने वाले जैपनीज़ टेक्स्ट के लिए लेआउट.JUSTIFICATION_MODE_NONE
का इस्तेमाल करके अंग्रेज़ी टेक्स्ट के लिए लेआउट.JUSTIFICATION_MODE_INTER_WORD
का इस्तेमाल करके, जैपनीज़ टेक्स्ट के लिए लेआउट.JUSTIFICATION_MODE_INTER_WORD
का इस्तेमाल करके अंग्रेज़ी टेक्स्ट के लिए लेआउट.JUSTIFICATION_MODE_INTER_CHARACTER
का इस्तेमाल करके, जैपनीज़ टेक्स्ट के लिए लेआउट.JUSTIFICATION_MODE_INTER_CHARACTER
का इस्तेमाल करके अंग्रेज़ी टेक्स्ट का लेआउट.लाइन अपने-आप टूटने की सुविधा को कॉन्फ़िगर करना
Android started supporting phrase-based line breaks for Japanese and Korean in
Android 13 (API level 33). However, while phrase-based line breaks improve the
readability of short lines of text, they don't work well for long lines of text.
In Android 15, apps can apply phrase-based line breaks only for short lines
of text, using the LINE_BREAK_WORD_STYLE_AUTO
option. This option selects the best word style option for the text.
For short lines of text, phrase-based line breaks are used, functioning the same
as LINE_BREAK_WORD_STYLE_PHRASE
, as shown in the
following image:
LINE_BREAK_WORD_STYLE_AUTO
applies phrase-based line breaks to improve the readability of the text.
This is the same as applying
LINE_BREAK_WORD_STYLE_PHRASE
.For longer lines of text, LINE_BREAK_WORD_STYLE_AUTO
uses a no
line-break word style, functioning the same as
LINE_BREAK_WORD_STYLE_NONE
, as shown in the
following image:
LINE_BREAK_WORD_STYLE_AUTO
applies no line-break word style to improve the readability of the text.
This is the same as applying
LINE_BREAK_WORD_STYLE_NONE
.जापानी हेंटाइगाना फ़ॉन्ट
In Android 15, a font file for old Japanese Hiragana (known as Hentaigana) is bundled by default. The unique shapes of Hentaigana characters can add a distinctive flair to artwork or design while also helping to preserve accurate transmission and understanding of ancient Japanese documents.
VideoLAN cone कॉपीराइट (c) 1996-2010 VideoLAN. इस लोगो या इसके बदले गए वर्शन का इस्तेमाल, कोई भी व्यक्ति VideoLAN प्रोजेक्ट या VideoLAN टीम के बनाए गए किसी भी प्रॉडक्ट के बारे में बताने के लिए कर सकता है. हालांकि, इसका मतलब यह नहीं है कि प्रोजेक्ट ने इस प्रॉडक्ट का प्रमोशन किया है.
Vulkan और Vulkan का लोगो, Khronos Group Inc. के रजिस्टर किए हुए ट्रेडमार्क हैं.
OpenGL एक रजिस्टर किया गया ट्रेडमार्क है और OpenGL ES लोगो, हेवलेट पैकार्ड एंटरप्राइज़ का ट्रेडमार्क है. इसका इस्तेमाल, Khronos की अनुमति से किया जाता है.