Android 15 में, डेवलपर के लिए शानदार सुविधाएं और एपीआई जोड़े गए हैं. इन सुविधाओं के बारे में यहां खास जानकारी दी गई है, ताकि आपको इनसे जुड़े एपीआई इस्तेमाल करने में मदद मिल सके.
जोड़े गए, बदले गए, और हटाए गए एपीआई की पूरी सूची देखने के लिए, एपीआई में अंतर की रिपोर्ट पढ़ें. जोड़े गए एपीआई के बारे में जानने के लिए, Android API रेफ़रंस देखें. Android 15 के लिए, एपीआई लेवल 35 में जोड़े गए एपीआई देखें. प्लेटफ़ॉर्म में हुए बदलावों से आपके ऐप्लिकेशन पर कहां-कहां असर पड़ सकता है, यह जानने के लिए, Android 15 को टारगेट करने वाले ऐप्लिकेशन और सभी ऐप्लिकेशन के लिए, Android 15 में हुए बदलावों के बारे में जानकारी देने वाला पेज देखें.
कैमरा और मीडिया
Android 15 में कई सुविधाएं शामिल हैं. इनसे, कैमरा और मीडिया का अनुभव बेहतर होता है. साथ ही, आपको ऐसे टूल और हार्डवेयर का ऐक्सेस मिलता है जिनकी मदद से, क्रिएटर्स Android पर अपनी क्रिएटिविटी को बेहतर तरीके से दिखा सकते हैं.
Android पर मीडिया और कैमरे से जुड़ी नई सुविधाओं और डेवलपर के लिए उपलब्ध समाधानों के बारे में ज़्यादा जानने के लिए, Google I/O में दिया गया, Building modern Android media and camera experiences टॉक देखें.
कम रोशनी वाला मोड
Android 15 introduces Low Light Boost, an auto-exposure mode available to both Camera 2 and the night mode camera extension. Low Light Boost adjusts the exposure of the Preview stream in low-light conditions. This is different from how the night mode camera extension creates still images, because night mode combines a burst of photos to create a single, enhanced image. While night mode works very well for creating a still image, it can't create a continuous stream of frames, but Low Light Boost can. Thus, Low Light Boost enables camera capabilities, such as:
- Providing an enhanced image preview, so users are better able to frame their low-light pictures
- Scanning QR codes in low light
If you enable Low Light Boost, it automatically turns on when there's a low light level, and turns off when there's more light.
Apps can record off the Preview stream in low-light conditions to save a brightened video.
For more information, see Low Light Boost.
ऐप्लिकेशन में कैमरे के कंट्रोल
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.
वर्चुअल MIDI 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 में, Android की मुख्य लाइब्रेरी को रीफ़्रेश करने का काम जारी है, ताकि इसे OpenJDK LTS के नए रिलीज़ की सुविधाओं के साथ अलाइन किया जा सके.
इसमें ये मुख्य सुविधाएं और सुधार शामिल हैं:
- NIO बफ़र से जुड़ी सुविधाओं को बेहतर बनाया गया है
- लाइव स्ट्रीम
mathऔरstrictmathके लिए अन्य तरीकेutilपैकेज के अपडेट, जिनमें क्रम से लगाए गएcollection,map, औरsetशामिल हैंDeflaterमेंByteBufferकी सहायता- सुरक्षा से जुड़े अपडेट, जैसे कि
X500PrivateCredentialऔर सुरक्षा कुंजी के अपडेट
ये एपीआई, Google Play के सिस्टम अपडेट की मदद से, Android 12 (एपीआई लेवल 31) और उसके बाद के वर्शन वाले एक अरब से ज़्यादा डिवाइसों पर अपडेट किए जाते हैं, ताकि आप प्रोग्रामिंग की नई सुविधाओं को टारगेट कर सकें.
पीडीएफ़ से जुड़े सुधार
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 वैरिएबल फ़ॉन्ट एपीआई को बेहतर बनाना
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 भी हैं.
लाइन ब्रेक को कंट्रोल करने की बेहतर सुविधा
Android 15 से, TextView और लाइन ब्रेकर, टेक्स्ट के दिए गए हिस्से को एक ही लाइन में बनाए रख सकते हैं, ताकि उसे पढ़ने में आसानी हो. लाइन ब्रेक को पसंद के मुताबिक बनाने की सुविधा का फ़ायदा पाने के लिए, स्ट्रिंग रिसॉर्स में <nobreak> टैग या createNoBreakSpan का इस्तेमाल करें. इसी तरह, <nohyphen> टैग या
createNoHyphenationSpan का इस्तेमाल करके, शब्दों को हाइफ़न से बचाया जा सकता है.
उदाहरण के लिए, यहां दी गई स्ट्रिंग रिसॉर्स में लाइन ब्रेक शामिल नहीं है. साथ ही, यह "Pixel 8 Pro" टेक्स्ट के साथ रेंडर होती है. यह टेक्स्ट, रेंडर होने के दौरान गलत जगह पर ब्रेक लेता है:
<resources>
<string name="pixel8pro">The power and brains behind Pixel 8 Pro.</string>
</resources>
इसके उलट, इस स्ट्रिंग संसाधन में <nobreak> टैग शामिल है, जो "Pixel 8 Pro" वाक्यांश को रैप करता है और लाइन ब्रेक को रोकता है:
<resources>
<string name="pixel8pro">The power and brains behind <nobreak>Pixel 8 Pro.</nobreak></string>
</resources>
इन स्ट्रिंग को रेंडर करने के तरीके में अंतर को यहां दी गई इमेज में दिखाया गया है:
<nobreak> टैग का इस्तेमाल करके रैप न किया गया हो.
<nobreak> टैग का इस्तेमाल करके रैप किया गया है.ऐप्लिकेशन संग्रहित करना
Android और Google Play ने पिछले साल, ऐप्लिकेशन को संग्रहित करने की सुविधा के बारे में एलान किया था. इसकी मदद से, उपयोगकर्ता अपने डिवाइस में कम इस्तेमाल किए जाने वाले उन ऐप्लिकेशन को हटाकर जगह खाली कर सकते हैं जिन्हें Google Play पर Android ऐप्लिकेशन बंडल का इस्तेमाल करके पब्लिश किया गया था. Android 15 में, ऐप्लिकेशन को संग्रहित करने और संग्रह से हटाने के लिए, ओएस लेवल पर सहायता शामिल है. इससे सभी ऐप स्टोर के लिए, इसे लागू करना आसान हो जाता है.
REQUEST_DELETE_PACKAGES अनुमति वाले ऐप्लिकेशन, PackageInstaller requestArchive तरीके का इस्तेमाल करके, इंस्टॉल किए गए ऐप्लिकेशन पैकेज को संग्रहित करने का अनुरोध कर सकते हैं. इससे APK और कैश मेमोरी में सेव की गई सभी फ़ाइलें हट जाती हैं, लेकिन उपयोगकर्ता का डेटा सेव रहता है. संग्रहित किए गए ऐप्लिकेशन, डिसप्ले करने लायक ऐप्लिकेशन के तौर पर वापस दिखेंगे. इसके लिए,
LauncherApps एपीआई; उपयोगकर्ताओं को एक यूज़र इंटरफ़ेस (यूआई) दिखेगा, ताकि यह हाइलाइट किया जा सके कि वे
ऐप्लिकेशन संग्रहित किए जाते हैं. अगर कोई उपयोगकर्ता संग्रहित किए गए किसी ऐप्लिकेशन पर टैप करता है, तो ऐप्लिकेशन इंस्टॉल करने वाले व्यक्ति को उसे अनअर्काइव करने का अनुरोध मिलेगा. साथ ही, ऐप्लिकेशन को वापस लाने की प्रोसेस को ACTION_PACKAGE_ADDED ब्रॉडकास्ट से मॉनिटर किया जा सकता है.
डेवलपर के लिए सेटिंग और टूल का इस्तेमाल करके, किसी डिवाइस पर 16 केबी मोड चालू करना
डिवाइस को 16 केबी मोड में बूट करने के लिए, डेवलपर विकल्प में जाकर 16 केबी पेज साइज़ के साथ बूट करें को टॉगल करें.
Android 15 के QPR वर्शन में, डेवलपर विकल्प का इस्तेमाल किया जा सकता है. यह विकल्प, कुछ डिवाइसों पर उपलब्ध होता है. इससे डिवाइस को 16 केबी मोड में बूट किया जा सकता है और डिवाइस पर टेस्टिंग की जा सकती है. डेवलपर के लिए सेटिंग और टूल का इस्तेमाल करने से पहले, सेटिंग > सिस्टम > सॉफ़्टवेयर अपडेट पर जाएं और उपलब्ध अपडेट लागू करें.
यह डेवलपर विकल्प, इन डिवाइसों पर उपलब्ध है:
Pixel 8 और 8 Pro (Android 15 QPR1 या उसके बाद के वर्शन के साथ)
Pixel 8a (Android 15 QPR1 या इसके बाद के वर्शन के साथ)
Pixel 9, 9 Pro, और 9 Pro XL (Android 15 QPR2 या इसके बाद के वर्शन के साथ)
Pixel 9a (Android 16 या इसके बाद के वर्शन के साथ)
ग्राफ़िक
Android 15 में, ग्राफ़िक से जुड़े नए सुधार किए गए हैं. इनमें ANGLE और Canvas ग्राफ़िक सिस्टम में किए गए बदलाव शामिल हैं.
Android पर जीपीयू ऐक्सेस को बेहतर बनाना
Android हार्डवेयर, शुरुआती दिनों के मुकाबले काफ़ी बदल गया है. शुरुआती दिनों में, मुख्य ओएस एक सीपीयू पर चलता था और जीपीयू को फ़िक्स्ड-फ़ंक्शन पाइपलाइन पर आधारित एपीआई का इस्तेमाल करके ऐक्सेस किया जाता था. Vulkan® ग्राफ़िक्स API, Android 7.0 (एपीआई लेवल 24) से NDK में उपलब्ध है. यह एपीआई, कम लेवल के एब्स्ट्रैक्शन के साथ काम करता है, जो आधुनिक जीपीयू हार्डवेयर को बेहतर तरीके से दिखाता है. साथ ही, यह कई सीपीयू कोर के साथ बेहतर तरीके से काम करता है और सीपीयू ड्राइवर के ओवरहेड को कम करता है. इससे ऐप्लिकेशन की परफ़ॉर्मेंस बेहतर होती है. Vulkan, सभी आधुनिक गेम इंजन के साथ काम करता है.
Android, जीपीयू के लिए Vulkan को प्राथमिकता देता है. इसलिए, Android 15 में ANGLE को वैकल्पिक लेयर के तौर पर शामिल किया गया है. इससे, Vulkan के साथ-साथ OpenGL® ES को भी चलाया जा सकता है. ANGLE पर स्विच करने से, Android OpenGL को बेहतर तरीके से लागू किया जा सकेगा. इससे, ऐप्लिकेशन के साथ बेहतर तरीके से काम करने के साथ-साथ, कुछ मामलों में बेहतर परफ़ॉर्मेंस भी मिलेगी. ANGLE की मदद से, अपने OpenGL ES ऐप्लिकेशन की परफ़ॉर्मेंस और स्थिरता की जांच की जा सकती है. इसके लिए, Android 15 पर सेटिंग -> सिस्टम -> डेवलपर के लिए सेटिंग और टूल -> एक्सपेरिमेंटल: ANGLE चालू करें में जाकर, डेवलपर के लिए सेटिंग चालू करें.
Vulkan के लिए Android ANGLE का रोडमैप
अपने जीपीयू स्टैक को बेहतर बनाने के लिए, हम आने वाले समय में ANGLE को ज़्यादा नए डिवाइसों पर, GL सिस्टम ड्राइवर के तौर पर शिप करेंगे. आने वाले समय में, OpenGL/ES सिर्फ़ ANGLE के ज़रिए उपलब्ध होगा. हालांकि, हमारा प्लान है कि हम सभी डिवाइसों पर OpenGL ES की सुविधा देना जारी रखें.
इसके बाद यह करें
OpenGL ES के लिए ANGLE ड्राइवर चुनने और अपने ऐप्लिकेशन की जांच करने के लिए, डेवलपर के विकल्पों का इस्तेमाल करें. नए प्रोजेक्ट के लिए, हमारा सुझाव है कि C/C++ के लिए Vulkan का इस्तेमाल करें.
कैनवस में किए गए सुधार
Android 15 में, Android के कैनवस ग्राफ़िक सिस्टम को और बेहतर बनाया गया है. इसमें ये नई सुविधाएं भी जोड़ी गई हैं:
Matrix44, निर्देशांकों को बदलने के लिए 4x4 मैट्रिक उपलब्ध कराता है. इसका इस्तेमाल तब करना चाहिए, जब आपको कैनवस को 3D में बदलना हो.clipShader, मौजूदा क्लिप को तय किए गए शेडर के साथ इंटरसेक्शन करता है. वहीं,clipOutShader, क्लिप को मौजूदा क्लिप और शेडर के अंतर पर सेट करता है. दोनों ही शेडर को ऐल्फ़ा मास्क के तौर पर इस्तेमाल करते हैं. इससे जटिल आकार आसानी से बनाए जा सकते हैं.
परफ़ॉर्मेंस और बैटरी
Android, आपके ऐप्लिकेशन की परफ़ॉर्मेंस और क्वालिटी को बेहतर बनाने में आपकी मदद करने पर फ़ोकस करता है. Android 15 में ऐसे एपीआई जोड़े गए हैं जिनकी मदद से, आपके ऐप्लिकेशन में टास्क को ज़्यादा असरदार तरीके से पूरा किया जा सकता है. साथ ही, ऐप्लिकेशन की परफ़ॉर्मेंस को ऑप्टिमाइज़ किया जा सकता है और अपने ऐप्लिकेशन के बारे में अहम जानकारी इकट्ठा की जा सकती है.
बैटरी की बचत करने के लिए सबसे सही तरीके, नेटवर्क और पावर के इस्तेमाल को डीबग करने, और Android 15 और Android के हाल के वर्शन में बैकग्राउंड में होने वाले काम के लिए बैटरी की बचत करने की सुविधा को बेहतर बनाने के बारे में जानने के लिए, Improving battery efficiency of background work on Android टॉक देखें.
ApplicationStartInfo API
Android के पिछले वर्शन में, ऐप्लिकेशन के शुरू होने की प्रोसेस को समझना थोड़ा मुश्किल था. आपके ऐप्लिकेशन में यह तय करना मुश्किल था कि वह कोल्ड, वॉर्म या हॉट स्टैटस से शुरू हुआ था. यह जानना भी मुश्किल था कि ऐप्लिकेशन को लॉन्च करने के अलग-अलग चरणों में कितना समय लगा: प्रोसेस को फ़ॉर्क करना, onCreate को कॉल करना, पहला फ़्रेम बनाना वगैरह. जब आपकी Application क्लास को इंस्टैंशिएट किया गया था, तब आपके पास यह जानने का कोई तरीका नहीं था कि ऐप्लिकेशन किसी ब्रॉडकास्ट, कॉन्टेंट प्रोवाइडर, जॉब, बैकअप, बूट पूरा होने, अलार्म या Activity से शुरू हुआ है.
Android 15 पर ApplicationStartInfo एपीआई, ये सभी सुविधाएं और इससे ज़्यादा सुविधाएं देता है. आपके पास फ़्लो में अपने टाइमस्टैंप जोड़ने का विकल्प भी होता है, ताकि एक ही जगह पर टाइमिंग का डेटा इकट्ठा किया जा सके. मेट्रिक इकट्ठा करने के अलावा, ApplicationStartInfo का इस्तेमाल करके ऐप्लिकेशन के शुरू होने की प्रोसेस को सीधे ऑप्टिमाइज़ किया जा सकता है. उदाहरण के लिए, जब आपका ऐप्लिकेशन किसी ब्रॉडकास्ट की वजह से शुरू हो रहा हो, तो Application क्लास में यूज़र इंटरफ़ेस (यूआई) से जुड़ी लाइब्रेरी को इंस्टैंशिएट करने की ज़रूरत नहीं होती.
ऐप्लिकेशन के साइज़ के बारे में ज़्यादा जानकारी
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 में ProfilingManager क्लास शामिल है. इसकी मदद से, अपने ऐप्लिकेशन में प्रोफ़ाइलिंग की जानकारी इकट्ठा की जा सकती है. जैसे, हेप डंप, हेप प्रोफ़ाइल, स्टैक सैंपलिंग वगैरह. यह आपके ऐप्लिकेशन को, दिए गए टैग के साथ कॉलबैक उपलब्ध कराता है. इससे, आउटपुट फ़ाइल की पहचान की जाती है. यह फ़ाइल, आपके ऐप्लिकेशन की फ़ाइल डायरेक्ट्री में डिलीवर की जाती है. एपीआई, परफ़ॉर्मेंस पर पड़ने वाले असर को कम करने के लिए, अनुरोध की दर को सीमित करता है.
अपने ऐप्लिकेशन में प्रोफ़ाइलिंग के अनुरोधों को आसानी से बनाने के लिए, हमारा सुझाव है कि आप Core 1.15.0-rc01 या इसके बाद के वर्शन में उपलब्ध, उससे जुड़े Profiling AndroidX API का इस्तेमाल करें.
SQLite डेटाबेस में किए गए सुधार
Android 15 introduces SQLite APIs that expose advanced features from the underlying SQLite engine that target specific performance issues that can manifest in apps. These APIs are included with the update of SQLite to version 3.44.3.
Developers should consult best practices for SQLite performance to get the most out of their SQLite database, especially when working with large databases or when running latency-sensitive queries.
- Read-only deferred transactions: when issuing transactions that are
read-only (don't include write statements), use
beginTransactionReadOnly()andbeginTransactionWithListenerReadOnly(SQLiteTransactionListener)to issue read-onlyDEFERREDtransactions. Such transactions can run concurrently with each other, and if the database is in WAL mode, they can run concurrently withIMMEDIATEorEXCLUSIVEtransactions. - Row counts and IDs: APIs were added to retrieve the count of changed
rows or the last inserted row ID without issuing an additional query.
getLastChangedRowCount()returns the number of rows that were inserted, updated, or deleted by the most recent SQL statement within the current transaction, whilegetTotalChangedRowCount()returns the count on the current connection.getLastInsertRowId()returns therowidof the last row to be inserted on the current connection. - Raw statements: issue a raw SQlite statement, bypassing convenience wrappers and any additional processing overhead that they may incur.
Android Dynamic Performance Framework के अपडेट
Android 15 continues our investment in the Android Dynamic Performance Framework (ADPF), a set of APIs that allow games and performance intensive apps to interact more directly with power and thermal systems of Android devices. On supported devices, Android 15 adds ADPF capabilities:
- A power-efficiency mode for hint sessions to indicate that their associated threads should prefer power saving over performance, great for long-running background workloads.
- GPU and CPU work durations can both be reported in hint sessions, allowing the system to adjust CPU and GPU frequencies together to best meet workload demands.
- Thermal headroom thresholds to interpret possible thermal throttling status based on headroom prediction.
To learn more about how to use ADPF in your apps and games, head over to the documentation.
निजता
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 में, Android Ad Services के नए एक्सटेंशन शामिल हैं. इनमें Android पर Privacy Sandbox का नया वर्शन भी शामिल है. यह बदलाव, उपयोगकर्ता की निजता को बेहतर बनाने और मोबाइल ऐप्लिकेशन के लिए दिलचस्पी के हिसाब से असरदार विज्ञापन दिखाने वाली टेक्नोलॉजी बनाने के हमारे काम का हिस्सा है. हमारे Privacy Sandbox पेज पर, Android के डेवलपर प्रीव्यू और बीटा प्रोग्राम में Privacy Sandbox के बारे में ज़्यादा जानकारी दी गई है. इससे आपको इस प्रोग्राम को शुरू करने में मदद मिलेगी.
Health Connect
Android 15 में, Health Connect by Android के नए एक्सटेंशन इंटिग्रेट किए गए हैं. यह एक सुरक्षित और एक ही जगह से कंट्रोल किया जा सकने वाला प्लैटफ़ॉर्म है. इसकी मदद से, सेहत और फ़िटनेस से जुड़ा वह डेटा मैनेज और शेयर किया जा सकता है जो ऐप्लिकेशन इकट्ठा करता है. इस अपडेट में, फ़िटनेस, पोषण, त्वचा के तापमान, ट्रेनिंग प्लान वगैरह के लिए, अन्य डेटा टाइप का इस्तेमाल करने की सुविधा जोड़ी गई है.
त्वचा के तापमान को ट्रैक करने की सुविधा की मदद से, उपयोगकर्ता किसी पहने जा सकने वाले डिवाइस या किसी अन्य ट्रैकिंग डिवाइस से, तापमान का ज़्यादा सटीक डेटा सेव और शेयर कर सकते हैं.
ट्रेनिंग के प्लान, कसरत के प्लान होते हैं. इनकी मदद से, उपयोगकर्ता अपने फ़िटनेस लक्ष्यों को हासिल कर सकता है. ट्रेनिंग के प्लान में, कसरत पूरी करने और परफ़ॉर्मेंस से जुड़े कई लक्ष्य शामिल होते हैं:
- बर्न की गई कैलोरी के हिसाब से लक्ष्य पूरा करने के लिए, दूरी, अवधि, दोहराव और कदम.
- ज़्यादा से ज़्यादा बार दोहराएं (AMRAP), गति, हृदय की दर, पावर, थकान की दर, और गति के आधार पर परफ़ॉर्मेंस के लक्ष्य.
Android में Health Connect में हुए नए अपडेट के बारे में यहां ज़्यादा जानें: Android के लिए, ज़रूरत के हिसाब से अनुभव तैयार करना 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 में दिया गया, Improve the user experience of your Android app टॉक देखें.
Generated Previews API की मदद से, विजेट की बेहतर झलकें देखना
Before Android 15, the only way to provide widget picker previews was to specify a static image or layout resource. These previews often differ significantly from the look of the actual widget when it is placed on the home screen. Also, static resources can't be created with Jetpack Glance, so a Glance developer had to screenshot their widget or create an XML layout to have a widget preview.
Android 15 adds support for generated previews. This means that app widget
providers can generate RemoteViews to use as the picker preview, instead
of a static resource.
Push API
Apps can provide generated previews through a push API. Apps can provide
previews at any point in their lifecycle, and don't receive an explicit request
from the host to provide previews. Previews are persisted in AppWidgetService,
and hosts can request them on-demand. The following example loads an XML widget
layout resource and sets it as the preview:
AppWidgetManager.getInstance(appContext).setWidgetPreview(
ComponentName(
appContext,
SociaLiteAppWidgetReceiver::class.java
),
AppWidgetProviderInfo.WIDGET_CATEGORY_HOME_SCREEN,
RemoteViews("com.example", R.layout.widget_preview)
)
The expected flow is:
- At any time, the widget provider calls
setWidgetPreview. The provided previews are persisted inAppWidgetServicewith other provider info. setWidgetPreviewnotifies hosts of an updated preview through theAppWidgetHost.onProvidersChangedcallback. In response, the widget host reloads all of its provider information.- When displaying a widget preview, the host checks
AppWidgetProviderInfo.generatedPreviewCategories, and if the chosen category is available, callsAppWidgetManager.getWidgetPreviewto return the saved preview for this provider.
When to call setWidgetPreview
Because there is no callback to provide previews, apps can choose to send previews at any point when they are running. How often to update the preview depends on the widget's use case.
The following list describes the two main categories of preview use cases:
- Providers that show real data in their widget previews, such as personalized or recent information. These providers can set the preview once the user has signed in or has done initial configuration in their app. After this, they can set up a periodic task to update the previews at their chosen cadence. Examples of this type of widget could be a photo, calendar, weather or news widget.
- Providers that show static information in previews or quick-action widgets that don't display any data. These providers can set previews once, when the app first launches. Examples of this type of widget include a drive quick actions widget or chrome shortcuts widget.
Some providers might show static previews on the hub mode picker, but real information on the homescreen picker. These providers should follow the guidance for both of these use cases to set previews.
पिक्चर में पिक्चर
Android 15 में, पिक्चर में पिक्चर (पीआईपी) मोड में बदलाव किए गए हैं. इससे, पीआईपी मोड में जाने पर, स्क्रीन पर वीडियो का ट्रांज़िशन ज़्यादा आसानी से हो पाता है. यह इनके लिए फ़ायदेमंद होगा ऐसे ऐप्लिकेशन जिनके मुख्य यूज़र इंटरफ़ेस (यूआई) के ऊपर यूआई एलिमेंट दिखते हैं, जो पीआईपी (पिक्चर में पिक्चर) में जाते हैं.
लॉजिक तय करने के लिए डेवलपर, onPictureInPictureModeChanged कॉलबैक का इस्तेमाल करते हैं
जो ओवरले किए गए यूज़र इंटरफ़ेस (यूआई) एलिमेंट के दिखने को टॉगल करता है. यह कॉलबैक है
यह तब ट्रिगर होता है, जब पीआईपी में एंट्री या एग्ज़िट ऐनिमेशन पूरा हो जाता है. इतने समय में शुरू होगा
Android 15 के हिसाब से, PictureInPictureUiState क्लास में कोई दूसरा राज्य शामिल है.
यूज़र इंटरफ़ेस (यूआई) की इस स्थिति में, Android 15 (एपीआई लेवल 35) को टारगेट करने वाले ऐप्लिकेशन,
Activity#onPictureInPictureUiStateChanged कॉलबैक को इसके साथ शुरू किया जा रहा है
पीआईपी ऐनिमेशन के शुरू होते ही isTransitioningToPip(). यहां हैं
ऐसे कई यूज़र इंटरफ़ेस (यूआई) एलिमेंट जो ऐप्लिकेशन के पीआईपी मोड में होने पर, इनके लिए काम के नहीं होते
व्यू या लेआउट के उदाहरण, जिनमें सुझाव, आगे होने वाली, और ऐसी जानकारी शामिल है
कॉन्टेंट, रेटिंग, और टाइटल के बारे में जानकारी शामिल होती है. जब ऐप्लिकेशन पीआईपी मोड में जाए, तो
इन यूज़र इंटरफ़ेस (यूआई) एलिमेंट को छिपाने के लिए onPictureInPictureUiStateChanged कॉलबैक. जब
पीआईपी विंडो से, ऐप्लिकेशन फ़ुल स्क्रीन मोड में जाता है.
इन एलिमेंट को दिखाने के लिए onPictureInPictureModeChanged कॉलबैक, जैसा कि इसमें दिखाया गया है
ये उदाहरण:
override fun onPictureInPictureUiStateChanged(pipState: PictureInPictureUiState) {
if (pipState.isTransitioningToPip()) {
// Hide UI elements
}
}
override fun onPictureInPictureModeChanged(isInPictureInPictureMode: Boolean) {
if (isInPictureInPictureMode) {
// Unhide UI elements
}
}
बिना काम के यूज़र इंटरफ़ेस (यूआई) एलिमेंट के इस क्विक विज़िबिलिटी टॉगल से, पीआईपी विंडो में यह पक्का करें कि पीआईपी (पिक्चर में पिक्चर) में जाने का ऐनिमेशन आसान और झिलमिलाने वाला हो.
'परेशान न करें' सुविधा के नियमों को बेहतर बनाना
AutomaticZenRule की मदद से ऐप्लिकेशन, 'ध्यान दें' सुविधा को अपनी पसंद के मुताबिक बना सकते हैं
मैनेजमेंट (परेशान न करें) के नियम और तय करें कि इन्हें कब चालू या बंद करना है
उन्हें. Android 15, इन नियमों को बेहतर तरीके से दिखाता है. ऐसा करने का मकसद,
उपयोगकर्ता अनुभव मिलता है. इसमें ये बदलाव शामिल हैं:
AutomaticZenRuleमें टाइप जोड़े जा रहे हैं. इससे सिस्टम, खास वैल्यू लागू कर सकता है कुछ नियम-कानूनों के बारे में बताता है.AutomaticZenRuleमें आइकॉन जोड़ा जा रहा है. इससे मोड बेहतर तरीके से काम करेगा पहचानने लायक.AutomaticZenRuleमें ऐसीtriggerDescriptionस्ट्रिंग जोड़ी जा रही है जो यह बताए ऐसी शर्तें जिनके आधार पर, उपयोगकर्ता के लिए नियम चालू होना चाहिए.- जोड़े गए
ZenDeviceEffectsसेAutomaticZenRuleतक, जिससे नियम ग्रेस्केल जैसी चीज़ों को ट्रिगर कर सकेंगे वॉलपेपर की रोशनी कम करने के लिए भी किया जा सकता है.
सूचना चैनलों के लिए VibrationEffect सेट करना
Android 15 पर, आने वाली सूचनाओं के लिए शानदार वाइब्रेशन सेटिंग चालू की जा सकती है
NotificationChannel.setVibrationEffect का इस्तेमाल कर रहे हैं, इसलिए
आपके उपयोगकर्ता इसके बिना अलग-अलग तरह की सूचनाओं के बीच अंतर कर सकते हैं
उन्हें अपने डिवाइस में देखना पड़ता है.
मीडिया प्रोजेक्शन स्टेटस बार चिप और ऑटो स्टॉप
मीडिया प्रोजेक्शन की सुविधा से, उपयोगकर्ता की निजी जानकारी सार्वजनिक हो सकती है. एक नया और प्रमुख स्टेटस बार चिप, उपयोगकर्ताओं को स्क्रीन पर चल रहे प्रोजेक्शन के बारे में बताता है. स्क्रीन को कास्ट करने, शेयर करने या रिकॉर्ड करने की सुविधा बंद करने के लिए, उपयोगकर्ता चिप पर टैप कर सकते हैं. साथ ही, बेहतर उपयोगकर्ता अनुभव के लिए, डिवाइस की स्क्रीन लॉक होने पर, स्क्रीन पर चल रहा प्रोजेक्शन अपने-आप बंद हो जाता है.
बड़ी स्क्रीन और फ़ॉर्म फ़ैक्टर
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 में, टैप करके पैसे चुकाने की सुविधा को ज़्यादा आसान और भरोसेमंद बनाने पर काम किया जा रहा है. साथ ही, Android के एनएफ़सी ऐप्लिकेशन के बेहतर नेटवर्क को भी बेहतर बनाने पर काम किया जा रहा है. जिन डिवाइसों पर यह सुविधा काम करती है उन पर ऐप्लिकेशन, NfcAdapter से निगरानी मोड में जाने का अनुरोध कर सकते हैं. इस मोड में डिवाइस, एनएफ़सी रीडर को सुनता है, लेकिन उनका जवाब नहीं देता. साथ ही, ऐप्लिकेशन की एनएफ़सी सेवा PollingFrame को प्रोसेस करने के लिए ऑब्जेक्ट भेजता है. PollingFrame ऑब्जेक्ट का इस्तेमाल, एनएफ़सी रीडर से पहली बार संपर्क करने से पहले पुष्टि करने के लिए किया जा सकता है. इससे कई मामलों में एक टैप से लेन-देन किया जा सकता है.
इसके अलावा, ऐप्लिकेशन ऐसे डिवाइसों पर फ़िल्टर रजिस्टर कर सकते हैं जिन पर यह सुविधा काम करती है. इससे उन्हें पोलिंग लूप गतिविधि की सूचना मिल सकती है. इससे, एनएफ़सी की सुविधा वाले कई ऐप्लिकेशन को आसानी से चलाया जा सकता है.
वॉलेट की भूमिका
Android 15 introduces a Wallet role that allows tighter integration with the user's preferred wallet app. This role replaces the NFC default contactless payment setting. Users can manage the Wallet role holder by navigating to Settings > Apps > Default Apps.
The Wallet role is used when routing NFC taps for AIDs registered in the payment category. Taps always go to the Wallet role holder unless another app that is registered for the same AID is running in the foreground.
This role is also used to determine where the Wallet Quick Access tile should go when activated. When the role is set to "None", the Quick Access tile isn't available and payment category NFC taps are only delivered to the foreground app.
सुरक्षा
Android 15 की मदद से, अपने ऐप्लिकेशन की सुरक्षा को बेहतर बनाया जा सकता है. साथ ही, अपने ऐप्लिकेशन के डेटा को सुरक्षित रखा जा सकता है. इसके अलावा, उपयोगकर्ताओं को अपने डेटा पर ज़्यादा कंट्रोल मिलता है और डेटा के इस्तेमाल के बारे में ज़्यादा जानकारी मिलती है. उपयोगकर्ताओं की सुरक्षा को बेहतर बनाने और नए खतरों से अपने ऐप्लिकेशन को बचाने के लिए, हम क्या कर रहे हैं, यह जानने के लिए Google I/O में दिया गया, Safeguarding user security on Android टॉक देखें.
ऑटोमैटिक तरीके से भरने की सुविधा के साथ, क्रेडेंशियल मैनेजर को इंटिग्रेट करना
Android 15 से, डेवलपर क्रेडेंशियल मैनेजर के अनुरोधों के साथ, उपयोगकर्ता नाम या पासवर्ड फ़ील्ड जैसे खास व्यू को लिंक कर सकते हैं. इससे, साइन-इन की प्रोसेस के दौरान उपयोगकर्ता को बेहतर अनुभव देना आसान हो जाता है. जब उपयोगकर्ता इनमें से किसी एक व्यू पर फ़ोकस करता है, तो उससे जुड़ा अनुरोध क्रेडेंशियल मैनेजर को भेजा जाता है. इस प्रोसेस से मिले क्रेडेंशियल, सभी सेवा देने वाली कंपनियों के साथ इकट्ठा किए जाते हैं और ऑटोमैटिक भरने की सुविधा के फ़ॉलबैक यूज़र इंटरफ़ेस (यूआई) में दिखाए जाते हैं. जैसे, इनलाइन सुझाव या ड्रॉप-डाउन सुझाव. डेवलपर के लिए, Jetpack androidx.credentials लाइब्रेरी का इस्तेमाल करना सबसे बेहतर है. यह लाइब्रेरी, Android 15 और इसके बाद के वर्शन में इस सुविधा को बेहतर बनाने के लिए जल्द ही उपलब्ध होगी.
बायोमेट्रिक प्रॉम्प्ट के साथ, एक टैप से साइन-अप और साइन-इन की सुविधा को इंटिग्रेट करना
क्रेडेंशियल मैनेजर बायोमेट्रिक प्रॉम्प्ट को क्रेडेंशियल बनाने की सुविधा में इंटिग्रेट करता है और साइन-इन करने की प्रोसेस को पूरा करता है. इससे, सेवा देने वाली कंपनियों को अपने बायोमेट्रिक प्रॉम्प्ट. इस वजह से, क्रेडेंशियल देने वालों को सिर्फ़ बनाने और पाने के नतीजे, बायोमेट्रिक फ़्लो के नतीजे के साथ बेहतर बनाए जाते हैं. यह आसान प्रोसेस, ज़्यादा बेहतर और आसान क्रेडेंशियल बनाती है बनाने और वापस पाने की प्रोसेस.
पूरी तरह सुरक्षित (E2EE) के लिए, कुंजी मैनेजमेंट
हम Android 15 में E2eeContactKeysManager को लॉन्च कर रहे हैं. इससे आपके Android ऐप्लिकेशन में एंड-टू-एंड एन्क्रिप्शन (E2EE) की सुविधा मिलती है. इसके लिए, क्रिप्टोग्राफ़िक सार्वजनिक कुंजियों को सेव करने के लिए, ओएस-लेवल का एपीआई उपलब्ध कराया जाता है.
E2eeContactKeysManager को प्लैटफ़ॉर्म के संपर्क ऐप्लिकेशन के साथ इंटिग्रेट करने के लिए डिज़ाइन किया गया है. इससे उपयोगकर्ताओं को अपने संपर्कों के सार्वजनिक कुंजियों को मैनेज करने और उनकी पुष्टि करने का एक ही तरीका मिलता है.
कॉन्टेंट यूआरआई पर अनुमति की जांच करना
Android 15 introduces a set of APIs that perform permission checks on content URIs:
Context.checkContentUriPermissionFull: This performs a full permission check on content URIs.Activitymanifest attributerequireContentUriPermissionFromCaller: This enforces specified permissions on the provided content URIs at activity launch.ComponentCallerclass forActivitycallers: This represents the app that launched the activity.
सुलभता
Android 15 में ऐसी सुविधाएं जोड़ी गई हैं जिनसे उपयोगकर्ताओं के लिए सुलभता बेहतर होती है.
ब्रेल की सुविधा को बेहतर बनाना
हमने Android 15 में, TalkBack को यूएसबी और सुरक्षित ब्लूटूथ, दोनों के ज़रिए HID स्टैंडर्ड का इस्तेमाल करने वाले ब्रेल डिसप्ले के साथ काम करने की सुविधा दी है.
यह स्टैंडर्ड, माउस और कीबोर्ड के इस्तेमाल किए जाने वाले स्टैंडर्ड से काफ़ी मिलता-जुलता है. इससे Android को समय के साथ, ब्रेल डिसप्ले की ज़्यादा से ज़्यादा वैरायटी के साथ काम करने में मदद मिलेगी.
इंटरनैशनलाइजेशन
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 Copyright (c) 1996-2010 VideoLAN. This logo or a modified version may be used or modified by anyone to refer to the VideoLAN project or any product developed by the VideoLAN team, but does not indicate endorsement by the project.
Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc.
OpenGL is a registered trademark and the OpenGL ES logo is a trademark of Hewlett Packard Enterprise used by permission by Khronos.