نظرة عامة على مكتبات Google Play الأساسية

توضّح هذه الصفحة مكتبات Google Play Core وكيفية إضافتها إلى مشروعك.

مكتبات Play Core هي واجهة وقت التشغيل لتطبيقك مع "متجر Google Play". في ما يلي بعض الإجراءات التي يمكنك اتّخاذها:

تتوفّر مكتبات Play Core في Java والرمز البرمجي الأصلي وUnity. لمزيد من المعلومات حول أحدث الإصدارات، يُرجى الاطّلاع على ملاحظات الإصدار.

نقل البيانات من مكتبة Java وKotlin في Play Core

تم تقسيم مكتبة Java وKotlin في Play Core إلى عدة مكتبات Android لكل ميزة. يقلّل ذلك من حجم مكتبات Play Core التي تتم إضافتها إلى تطبيقك، كما يتيح دورات إصدار أسرع للميزات الفردية.

ظلّ سلوك كل ميزة متسقًا في عملية نقل البيانات هذه، والتغيير الوحيد الملحوظ هو أنّ الإصدارات الجديدة اعتمدت Task API في "خدمات Google Play".

استخدِم القائمة أدناه للانتقال إلى المكتبات الجديدة والاستفادة من الميزات الجديدة وإصلاحات الأخطاء. إذا كنت تستخدم ميزات متعددة في Play، يمكنك ببساطة استيراد مكتبات متعددة في ملف build.gradle في آنٍ واحد.

خطوات نقل البيانات الشائعة

  1. عدِّل أي عبارات استيراد حالية لعناصر Task من import com.google.android.play.core.tasks.*; إلى import com.google.android.gms.tasks.*;. لم يتم تغيير أي من أسماء الصفوف.
  2. أزِل أي عمليات استيراد لمكتبات Play Core القديمة في ملف build.gradle.

دمج مكتبة Play Asset 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: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

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

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
  1. يعني استخدامك لحزمة تطوير البرامج Play Core Software Development Kit أنّك توافق على هذه البنود إلى جانب بنود خدمة Google APIs والمُشار إليها هنا بـ "بنود خدمة واجهات برمجة التطبيقات". في حال حدوث تعارُض بين هذين النوعين من البنود، ستكون لهذه البنود في هذا المستند الأولوية على "بنود خدمة واجهات برمجة التطبيقات". يُرجى قراءة هذه البنود إلى جانب "بنود خدمة واجهات برمجة التطبيقات" بعناية.
  2. في هذه البنود، يشير مصطلح "واجهات برمجة التطبيقات" إلى كلّ من واجهات برمجة التطبيقات المقدَّمة من Google، وخدمات المطورين الأخرى، والبرامج المرتبطة، بما في ذلك أي "رمز برمجي قابل لإعادة التوزيع".
  3. يشير مصطلح "رمز برمجي قابل لإعادة التوزيع" إلى أي رموز كائنات أو ملفات عناوين مُقدَّمة من Google تطلب البيانات من "واجهات برمجة التطبيقات".
  4. بموجب هذه البنود و"بنود خدمة واجهات برمجة التطبيقات"، لا يجوز لك نسخ أي "رمز برمجي قابل لإعادة التوزيع" وتوزيعه إلّا بغرض تضمينه في برنامجك الذي يستخدم واجهات برمجة التطبيقات. وتمتلك Google وجهاتها المرخِّصة جميع الحقوق وحقوق الملكية والمصالح في ما يخص أي "رمز برمجي قابل لإعادة التوزيع"، بما في ذلك جميع حقوق الملكية الفكرية وغيرها من حقوق الملكية. لا يجوز لك تعديل أي "رمز برمجي قابل لإعادة التوزيع" أو ترجمته أو إنشاء أعمال اشتقاقية منه.
  5. يجوز لشركة Google إجراء تغييرات على هذه البنود في أي وقت وإرسال إشعار إليك ومنحك الفرصة لرفض متابعة استخدام حزمة تطوير البرامج Play Core. ستنشر Google إشعارًا بالتعديلات على البنود على الرابط: https://developer.android.com/guide/playcore/license. ولن يتم تطبيق التغييرات بأثر رجعي.