इस पेज पर, Google Play Core लाइब्रेरी के बारे में बताया गया है. साथ ही, इन्हें अपने प्रोजेक्ट में जोड़ने का तरीका भी बताया गया है.
Google Play Core लाइब्रेरी, Google Play Store के साथ आपके ऐप्लिकेशन का रनटाइम इंटरफ़ेस होती हैं. यहां कुछ ऐसे काम दिए गए हैं जो किए जा सकते हैं:
- अन्य भाषाओं के संसाधन डाउनलोड करना
- फ़ीचर मॉड्यूल की डिलीवरी मैनेज करना
- ऐसेट पैक की डिलीवरी मैनेज करना
- ऐप्लिकेशन में अपडेट ट्रिगर करना
- ऐप्लिकेशन में समीक्षाओं का अनुरोध करना
Play Core लाइब्रेरी, Java, नेटिव, और Unity में उपलब्ध हैं. नई रिलीज़ के बारे में ज़्यादा जानने के लिए, रिलीज़ नोट देखें.
Play Core Java और Kotlin लाइब्रेरी से माइग्रेट करना
Play Core Java और Kotlin लाइब्रेरी को, सुविधा के हिसाब से कई Android लाइब्रेरी में बाँट दिया गया है. इससे Play Core लाइब्रेरी की वजह से, आपके ऐप्लिकेशन का साइज़ कम हो जाता है. साथ ही, अलग-अलग सुविधाओं को तेज़ी से रिलीज़ किया जा सकता है.
इस माइग्रेशन में, हर सुविधा के काम करने के तरीके में कोई बदलाव नहीं हुआ है. सिर्फ़ एक अहम बदलाव यह हुआ है कि नए वर्शन में Google Play services के Task API का इस्तेमाल किया गया है.
नई लाइब्रेरी पर माइग्रेट करने के लिए, यहां दी गई सूची का इस्तेमाल करें. इससे आपको नई सुविधाओं का फ़ायदा मिलेगा और गड़बड़ियों को ठीक करने में मदद मिलेगी. अगर Play की कई सुविधाओं का इस्तेमाल किया जाता है, तो एक ही बार में अपनी build.gradle
फ़ाइल में कई लाइब्रेरी इंपोर्ट की जा सकती हैं.
माइग्रेट करने का सामान्य तरीका
- टास्क ऑब्जेक्ट के
import com.google.android.play.core.tasks.*;
सेimport com.google.android.gms.tasks.*;
तक के किसी भी मौजूदा इंपोर्ट स्टेटमेंट को अपडेट करें. क्लास के सभी नाम पहले जैसे ही हैं. - अपनी
build.gradle
फ़ाइल में, Play Core लाइब्रेरी के पुराने वर्शन के इंपोर्ट किए गए सभी आइटम हटाएं.
Play ऐसेट डिलीवरी लाइब्रेरी को इंटिग्रेट करना
Groovy
// In your app's build.gradle file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // So, make sure you also include that repository in your project's build.gradle file. implementation 'com.google.android.play:asset-delivery:2.3.0' // For Kotlin users also add the Kotlin extensions library for Play Asset Delivery: implementation 'com.google.android.play:asset-delivery-ktx:2.3.0' ... }
Kotlin
// In your app's build.gradle.kts file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // So, make sure you also include that repository in your project's build.gradle file. implementation("com.google.android.play:asset-delivery:2.3.0") // For Kotlin users also import the Kotlin extensions library for Play Asset Delivery: implementation("com.google.android.play:asset-delivery-ktx:2.3.0") ... }
Play Feature Delivery Library को इंटिग्रेट करना
Groovy
// In your app's build.gradle file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // So, make sure you also include that repository in your project's build.gradle file. implementation 'com.google.android.play:feature-delivery:2.1.0' // For Kotlin users, also add the Kotlin extensions library for Play Feature Delivery: implementation 'com.google.android.play:feature-delivery-ktx:2.1.0' ... }
Kotlin
// In your app's build.gradle.kts file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // Make sure you also include that repository in your project's build.gradle file. implementation("com.google.android.play:feature-delivery:2.1.0") // For Kotlin users, also import the Kotlin extensions library for Play Feature Delivery: implementation("com.google.android.play:feature-delivery-ktx:2.1.0") ... }
Play In-App Review Library को इंटिग्रेट करना
Groovy
// In your app's build.gradle file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // Make sure you also include that repository in your project's build.gradle file. implementation 'com.google.android.play:review:2.0.2' // For Kotlin users, also add the Kotlin extensions library for Play In-App Review: implementation 'com.google.android.play:review-ktx:2.0.2' ... }
Kotlin
// In your app's build.gradle.kts file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // Make sure you also include that repository in your project's build.gradle file. implementation("com.google.android.play:review:2.0.2") // For Kotlin users, also import the Kotlin extensions library for Play In-App Review: implementation("com.google.android.play:review-ktx:2.0.2") ... }
Play In-App Update Library को इंटिग्रेट करना
Groovy
// In your app's build.gradle file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // Make sure you also include that repository in your project's build.gradle file. implementation 'com.google.android.play:app-update:2.1.0' // For Kotlin users, also add the Kotlin extensions library for Play In-App Update: implementation 'com.google.android.play:app-update-ktx:2.1.0' ... }
Kotlin
// In your app's build.gradle.kts file: ... dependencies { // This dependency is downloaded from the Google's Maven repository. // Make sure you also include that repository in your project's build.gradle file. implementation("com.google.android.play:app-update:2.1.0") // For Kotlin users, also import the Kotlin extensions library for Play In-App Update: implementation("com.google.android.play:app-update-ktx:2.1.0") ... }
Play Core सॉफ़्टवेयर डेवलपमेंट किट की सेवा की शर्तें
पिछली बार किए गए बदलावों की तारीख: 24 सितंबर, 2020- Play Core Software Development Kit का इस्तेमाल करने का मतलब है कि आप इन शर्तों के साथ-साथ, Google API की सेवा की शर्तों ("एपीआई की सेवा की शर्तें") से भी सहमत हैं. अगर इन शर्तों और एपीआई की सेवा की शर्तों के बीच कभी कोई टकराव होता है, तो इन शर्तों को एपीआई की सेवा की शर्तों के मुकाबले प्राथमिकता दी जाएगी. कृपया इन शर्तों और एपीआई की सेवा की शर्तों को ध्यान से पढ़ें.
- इन शर्तों के लिए, "एपीआई" का मतलब Google के एपीआई, डेवलपर की अन्य सेवाओं, और उनसे जुड़े सॉफ़्टवेयर से है. इसमें फिर से डिस्ट्रिब्यूट किया जा सकने वाला कोड भी शामिल है.
- “Redistributable Code” का मतलब है, Google की ओर से उपलब्ध कराया गया ऑब्जेक्ट कोड या हेडर फ़ाइलें, जो एपीआई को कॉल करती हैं.
- इन शर्तों और एपीआई की सेवा की शर्तों के मुताबिक, एपीआई क्लाइंट में शामिल करने के लिए, रीडिस्ट्रिब्यूट किए जा सकने वाले कोड को कॉपी और डिस्ट्रिब्यूट किया जा सकता है. Google और इसके लाइसेंस देने वालों के पास, फिर से डिस्ट्रिब्यूट किए जा सकने वाले कोड से जुड़े सभी अधिकार, मालिकाना हक, और हित होते हैं. इनमें सभी बौद्धिक संपत्ति और अन्य मालिकाना अधिकार शामिल हैं. आप रीडिस्ट्रिब्यूट किए जा सकने वाले कोड में बदलाव नहीं करेंगे, उसका अनुवाद नहीं करेंगे या उससे मिलते-जुलते काम नहीं करेंगे.
- Google, किसी भी समय नोटिस के साथ इन शर्तों में बदलाव कर सकता है और आने वाले समय में कभी भी Play Core Software Development Kit के इस्तेमाल को बंद कर सकता है. Google, शर्तों में हुए बदलावों के बारे में https://developer.android.com/guide/playcore/license पर नोटिस पोस्ट करेगा. बदलाव रेट्रोऐक्टिव (पहले से लागू) नहीं होंगे.