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

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

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

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

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

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

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

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

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

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

دمج مكتبة عرض المواد في Play

رائع

// 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.2.2'

    // For Kotlin users also add the Kotlin extensions library for Play Asset Delivery:
    implementation 'com.google.android.play:asset-delivery-ktx:2.2.2'
    ...
}

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.2.2")

    // For Kotlin users also import the Kotlin extensions library for Play Asset Delivery:
    implementation("com.google.android.play:asset-delivery-ktx:2.2.2")
    ...
}

دمج مكتبة عرض الميزات في Play

رائع

// 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 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.1'

    // For Kotlin users, also add the Kotlin extensions library for Play In-App Review:
    implementation 'com.google.android.play:review-ktx:2.0.1'
    ...
}

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.1")

    // For Kotlin users, also import the Kotlin extensions library for Play In-App Review:
    implementation("com.google.android.play:review-ktx:2.0.1")
    ...
}

دمج مكتبة التحديث داخل التطبيق على Play

رائع

// 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

تاريخ آخر تعديل: 24 أيلول (سبتمبر) 2020
  1. يعني استخدامك "حزمة تطوير البرامج الأساسية" في Play أنّك توافق على هذه البنود بالإضافة إلى بنود خدمة Google APIs (يُشار إليها باسم "بنود خدمة واجهات برمجة التطبيقات"). في حال حدوث تعارُض بين هذين النوعين من البنود، ستكون لهذه البنود في هذا المستند الأولوية على "بنود خدمة واجهات برمجة التطبيقات". يُرجى قراءة هذه البنود إلى جانب "بنود خدمة واجهات برمجة التطبيقات" بعناية.
  2. في هذه البنود، يشير مصطلح "واجهات برمجة التطبيقات" إلى كلّ من واجهات برمجة التطبيقات المقدَّمة من Google، وخدمات المطورين الأخرى، والبرامج المرتبطة، بما في ذلك أي "رمز برمجي قابل لإعادة التوزيع".
  3. يشير مصطلح "رمز برمجي قابل لإعادة التوزيع" إلى أي رموز كائنات أو ملفات عناوين مُقدَّمة من Google تطلب البيانات من "واجهات برمجة التطبيقات".
  4. بموجب هذه البنود و"بنود خدمة واجهات برمجة التطبيقات"، لا يجوز لك نسخ أي "رمز برمجي قابل لإعادة التوزيع" وتوزيعه إلّا بغرض تضمينه في برنامجك الذي يستخدم واجهات برمجة التطبيقات. وتمتلك Google وجهاتها المرخِّصة جميع الحقوق وحقوق الملكية والمصالح في ما يخص أي "رمز برمجي قابل لإعادة التوزيع"، بما في ذلك جميع حقوق الملكية الفكرية وغيرها من حقوق الملكية. لا يجوز لك تعديل أي "رمز برمجي قابل لإعادة التوزيع" أو ترجمته أو إنشاء أعمال اشتقاقية منه.
  5. يجوز لشركة Google إجراء تغييرات على هذه البنود في أي وقت وإرسال إشعار إليك ومنحك الفرصة لرفض متابعة استخدام "حزمة تطوير البرامج الأساسية" في Play. ستنشر Google إشعارًا بالتعديلات على البنود على الرابط https://developer.android.com/guide/playcore/الترخيص. ولن يتم تطبيق التغييرات بأثر رجعي.