توضّح هذه الصفحة مكتبات Google Play Core وكيفية إضافتها إلى مشروعك.
مكتبات Google Play Core هي واجهة وقت تشغيل تطبيقك مع "متجر Google Play". في ما يلي بعض الإجراءات التي يمكنك تنفيذها:
- تنزيل موارد لغة إضافية
- إدارة إرسال وحدات الميزات
- إدارة إرسال حِزم مواد العرض
- تشغيل التحديثات داخل التطبيق
- طلب مراجعات داخل التطبيق
تتوفّر مكتبات Play Core بلغات Java و Native وUnity. لمزيد من المعلومات عن أحدث الإصدارات، يُرجى الاطّلاع على ملاحظات الإصدار.
نقل البيانات من مكتبة Play الأساسية في Java وKotlin
تم تقسيم مكتبة Play الأساسية Java وKotlin إلى عدة مكتبات Android لكل ميزة. يؤدي ذلك إلى تقليل حجم مكتبة Play الأساسية التي تتم إضافتها إلى تطبيقك ويسمح بدورات إصدار أسرع للميزات الفردية.
ظلّ سلوك كل ميزة ثابتًا في عملية نقل البيانات هذه، والتغيير الملحوظ الوحيد هو أنّ الإصدارات الجديدة اعتمدت Task API من "خدمات Google Play".
استخدِم القائمة أدناه لنقل البيانات إلى المكتبات الجديدة والاستفادة من الميزات الجديدة وإصلاحات الأخطاء. إذا كنت تستخدم ميزات متعددة من Play، يمكنك ببساطة استيراد مكتبات متعددة في ملف build.gradle في آنٍ واحد.
خطوات نقل البيانات الشائعة
- عدِّل أي عبارات استيراد حالية لعناصر Task من
import com.google.android.play.core.tasks.*;إلىimport com.google.android.gms.tasks.*;. لم يتم تغيير أي من أسماء الفئات. - أزِل أي عمليات استيراد لمكتبات 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.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
أنيق
// 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.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 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- يعني استخدامك لمكتبة Play الأساسية أنّك توافق على هذه البنود إلى جانب بنود خدمة Google APIs والمُشار إليها هنا بـ "بنود خدمة واجهات برمجة التطبيقات". في حال حدوث تعارُض بين هذين النوعين من البنود، ستكون لهذه البنود في هذا المستند الأولوية على "بنود خدمة واجهات برمجة التطبيقات". يُرجى قراءة هذه البنود إلى جانب "بنود خدمة واجهات برمجة التطبيقات" بعناية.
- في هذه البنود، يشير مصطلح "واجهات برمجة التطبيقات" إلى كلّ من واجهات برمجة التطبيقات المقدَّمة من Google، وخدمات المطورين الأخرى، والبرامج المرتبطة، بما في ذلك أي "رمز برمجي قابل لإعادة التوزيع".
- يشير مصطلح "رمز برمجي قابل لإعادة التوزيع" إلى أي رموز كائنات أو ملفات عناوين مُقدَّمة من Google تطلب البيانات من "واجهات برمجة التطبيقات".
- بموجب هذه البنود و"بنود خدمة واجهات برمجة التطبيقات"، لا يجوز لك نسخ أي "رمز برمجي قابل لإعادة التوزيع" وتوزيعه إلّا بغرض تضمينه في برنامجك الذي يستخدم واجهات برمجة التطبيقات. وتمتلك Google وجهاتها المرخِّصة جميع الحقوق وحقوق الملكية والمصالح في ما يخص أي "رمز برمجي قابل لإعادة التوزيع"، بما في ذلك جميع حقوق الملكية الفكرية وغيرها من حقوق الملكية. لا يجوز لك تعديل أي "رمز برمجي قابل لإعادة التوزيع" أو ترجمته أو إنشاء أعمال اشتقاقية منه.
- يجوز لشركة Google إجراء تغييرات على هذه البنود في أي وقت وإرسال إشعار إليك ومنحك الفرصة لرفض متابعة استخدام حزمة تطوير البرامج (SDK) في مكتبة Play الأساسية. ستنشر Google إشعارًا بالتعديلات على البنود على الرابط: https://developer.android.com/guide/playcore/license. ولن يتم تطبيق التغييرات بأثر رجعي.