Google Play Core लाइब्रेरी की खास जानकारी

इस पेज पर, Google Play Core लाइब्रेरी के बारे में बताया गया है. साथ ही, यह भी बताया गया है कि इन्हें अपने प्रोजेक्ट में कैसे जोड़ा जाए.

Google Play Core लाइब्रेरी, आपके ऐप्लिकेशन का Google Play Store के साथ रनटाइम इंटरफ़ेस होती हैं. इन लाइब्रेरी की मदद से, ये काम किए जा सकते हैं:

Play Core लाइब्रेरी, Java, Native, और Unity में उपलब्ध हैं. हाल ही में रिलीज़ हुए वर्शन के बारे में ज़्यादा जानने के लिए, रिलीज़ नोट देखें .

Play Core की Java और Kotlin लाइब्रेरी से माइग्रेट करना

Play Core की Java और Kotlin लाइब्रेरी को, हर सुविधा के लिए अलग-अलग Android लाइब्रेरी में बांटा गया है. इससे, Play Core लाइब्रेरी की वजह से आपके ऐप्लिकेशन का साइज़ नहीं बढ़ता. साथ ही, हर सुविधा को तेज़ी से रिलीज़ किया जा सकता है.

इस माइग्रेशन में, हर सुविधा का व्यवहार एक जैसा रहा है. इसमें सिर्फ़ एक अहम बदलाव किया गया है. वह यह है कि नए वर्शन में, Google Play services के Task API को अपनाया गया है.

नई लाइब्रेरी में माइग्रेट करने और नई सुविधाओं का फ़ायदा पाने के लिए, यहां दी गई सूची का इस्तेमाल करें. साथ ही, इसमें गड़बड़ियां भी ठीक की गई हैं. अगर Play की एक से ज़्यादा सुविधाओं का इस्तेमाल किया जाता है, तो build.gradle फ़ाइल में एक साथ कई लाइब्रेरी इंपोर्ट की जा सकती हैं.

माइग्रेशन के सामान्य चरण

  1. Task ऑब्जेक्ट के मौजूदा इंपोर्ट स्टेटमेंट को import com.google.android.play.core.tasks.*; से बदलकर import com.google.android.gms.tasks.*; करें. क्लास के सभी नाम पहले जैसे ही हैं.
  2. build.gradle फ़ाइल में, Play Core की पुरानी लाइब्रेरी के सभी इंपोर्ट हटाएं.

Play Asset Delivery लाइब्रेरी को इंटिग्रेट करना

शानदार

// 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 लाइब्रेरी को इंटिग्रेट करना

शानदार

// 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 लाइब्रेरी को इंटिग्रेट करना

शानदार

// 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 लाइब्रेरी को इंटिग्रेट करना

शानदार

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