קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Places Android KTX הוא אוסף של תוספי Kotlin ל-Places SDK ל-Android. התוספים האלה מספקים תכונות של שפת Kotlin שמאפשרות לכם לכתוב קוד תמציתי ואידיומטי של Kotlin כשאתם מפתחים ל-Places SDK ל-Android.
ספריית Places KTX היא קוד פתוח וזמינה ב-GitHub, עם דוגמאות.
התקנה של KTX ל-Places SDK
כדי להתקין את KTX עבור Places SDK ל-Android, מוסיפים את התלות הבאה לקובץ build.gradle.kts ברמת האפליקציה.
dependencies{// KTX for the Places SDK for Android libraryimplementation("com.google.maps.android:places-ktx:3.3.1")}
ניסיון של אפליקציה לדוגמה
מאגר GitHub של הספרייה הזו מכיל גם אפליקציית הדגמה שמראה איך אפשר להשתמש בספריית Places KTX באפליקציה שלכם.
כדי לנסות את אפליקציית ההדגמה, מבצעים את השלבים הבאים:
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-09-04 (שעון UTC)."],[[["\u003cp\u003ePlaces Android KTX offers Kotlin extensions for streamlined Places SDK interaction using idiomatic Kotlin.\u003c/p\u003e\n"],["\u003cp\u003eNative Kotlin APIs within the Places SDK for Android (version 4.0.0 and later) can be used as an alternative to Places Android KTX extensions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can easily integrate Places KTX by adding the specified dependency to their app's \u003ccode\u003ebuild.gradle.kts\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eA demo application within the GitHub repository provides practical examples of utilizing the Places KTX library.\u003c/p\u003e\n"]]],["Places KTX provides Kotlin extensions for the Places SDK for Android, enabling concise Kotlin development. Install it by adding the `com.google.maps.android:places-ktx:3.3.1` dependency to your app's `build.gradle.kts` file. A demo app is available on GitHub; to run it, clone the repository, obtain a Places API key, and store it in a `secrets.properties` file in the root directory. Select and Run the **app-places-ktx** module in Android Studio. The Places SDK also offers native Kotlin APIs as of version 4.0.0.\n"],null,[]]