इस पेज पर, 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 का इस्तेमाल किया गया है.
नई लाइब्रेरी पर माइग्रेट करने के लिए, यहां दी गई सूची का इस्तेमाल करें. साथ ही, नई सुविधाओं और गड़बड़ियां ठीक करने की सुविधा का फ़ायदा पाएं. अगर आपको Google 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 लाइब्रेरी को इंटिग्रेट करना
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 सॉफ़्टवेयर डेवलपमेंट किट का इस्तेमाल करने का मतलब है कि आप इन शर्तों के साथ-साथ, Google API की सेवा की शर्तों ("एपीआई की सेवा की शर्तों") से भी सहमत हैं. अगर इन शर्तों में कभी कोई टकराव होता है, तो एपीआई की सेवा की शर्तों के बजाय ये शर्तें लागू होंगी. कृपया इन शर्तों और एपीआई की सेवा की शर्तों को ध्यान से पढ़ें.
- इन शर्तों के मुताबिक, "एपीआई" का मतलब Google के एपीआई, डेवलपर के लिए उपलब्ध अन्य सेवाओं, और उनसे जुड़े सॉफ़्टवेयर से है. इनमें फिर से डिस्ट्रिब्यूट किया जा सकने वाला कोड भी शामिल है.
- “फिर से डिस्ट्रिब्यूट किए जा सकने वाले कोड” का मतलब है, Google से मिला ऑब्जेक्ट कोड या हेडर फ़ाइलें, जो एपीआई को कॉल करती हैं.
- इन शर्तों और एपीआई की सेवा की शर्तों के मुताबिक, Redistributable Code को सिर्फ़ अपने एपीआई क्लाइंट के हिस्से के तौर पर शामिल करने के लिए कॉपी और डिस्ट्रिब्यूट किया जा सकता है. Google और उसे लाइसेंस देने वाली कंपनियों के पास, फिर से उपलब्ध कराए जा सकने वाले कोड के सभी अधिकार, टाइटल, और हित सुरक्षित हैं. इनमें बौद्धिक संपत्ति और अन्य मालिकाना हक भी शामिल हैं. आपके पास फिर से डिस्ट्रिब्यूट किए जा सकने वाले कोड में बदलाव करने, उसका अनुवाद करने या उस पर आधारित कोई अन्य काम करने का अधिकार नहीं होगा.
- Google, नोटिस देकर किसी भी समय इन शर्तों में बदलाव कर सकता है. साथ ही, आने वाले समय में कभी भी Play Core सॉफ़्टवेयर डेवलपमेंट किट के इस्तेमाल को बंद कर सकता है. Google, शर्तों में हुए बदलावों के बारे में, https://developer.android.com/guide/playcore/license पर नोटिस पोस्ट करेगा. बदलाव रेट्रोऐक्टिव (पहले से लागू) नहीं होंगे.