סקירה כללית של ספריות הליבה של Google Play

בדף הזה מתוארות ספריות הליבה של Google Play ואיך להוסיף אותן פרויקט.

ספריות הליבה של Google Play הן ממשק זמן הריצה של האפליקציה שלך ב-Google Play חנות. ריכזנו כאן כמה מהפעולות שאפשר לעשות שם:

ספריות הליבה של Play זמינות ב Java, Native ו-Unity. לקבלת מידע נוסף מידע על הגרסאות האחרונות, נתוני גרסה.

מיגרציה מ-Play Core Java ומספריית Kotlin

ספריית Play Core Java וספריית Kotlin חולקו למחיצות של ספריות Android לכל תכונה. הפעולה הזו מצמצמת את הגודל של ספריות הליבה של Play שמוסיפים של האפליקציה ומאפשרים מחזורי הפצה מהירים יותר של כל תכונה.

ההתנהגות של כל תכונה נשארה עקבית בהעברה הזו, השינוי המשמעותי הוא שבגרסאות החדשות אימצו את Google Play Services Tasks API.

הרשימה שבהמשך תעזור לך לעבור לספריות החדשות וליהנות מתכונות חדשות ותיקוני באגים. אם משתמשים בכמה תכונות של Play, אפשר פשוט לייבא ספריות בקובץ build.gradle בו-זמנית.

שלבים נפוצים להעברה

  1. צריך לעדכן את כל הצהרות הייבוא הקיימות של אובייקטי משימה מ-import com.google.android.play.core.tasks.*; ל-import com.google.android.gms.tasks.*;. כל שמות הכיתות לא השתנו.
  2. צריך להסיר את כל הייבוא של ספריות Google Play הישנות מהקובץ build.gradle.

משלבים את ספריית 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.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 ("תנאים והגבלות של API"). במקרה של סתירה בין התנאים, התנאים האלה יקבלו עדיפות על פני התנאים וההגבלות של ה-API. יש לקרוא בעיון את התנאים האלה ואת התנאים וההגבלות של ה-API.
  2. למטרות התנאים האלה, "ממשקי API" הם ממשקי ה-API של Google, שירותי מפתחים אחרים והתוכנה שמשויכת אליהם, כולל כל קוד שניתן להפצה.
  3. 'קוד שניתן להפצה' הוא קוד אובייקט או קובצי כותרת ש-Google מספקת וקוראים לממשקי ה-API.
  4. בכפוף לתנאים האלה ולתנאים של התנאים וההגבלות של ה-API, יש לך אפשרות להעתיק ולהפיץ את הקוד שניתן להפצה מחדש רק לצורך הכללה כחלק מלקוח ה-API שלך. ל-Google ולמעניקי הרישיון שלה יש כל זכות, בעלות וזיקה, כולל כל קניין רוחני וזכויות קנייניות אחרות, בחוק להפצה חוזרת. אסור לשנות, לתרגם או ליצור יצירות נגזרות של קוד שניתן להפצה.
  5. Google רשאית לבצע שינויים בתנאים האלה בכל עת על-ידי פרסום הודעה מראש ומתן הזדמנות לבטל את המשך השימוש בערכת פיתוח התוכנה הבסיסית של Play. Google תפרסם הודעה לגבי שינויים בתנאים בכתובת https://developer.android.com/guide/playcore/שונות. השינויים לא יחולו באופן רטרואקטיבי.