Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Android KTX Places adalah kumpulan ekstensi Kotlin untuk
Places SDK for Android. Ekstensi ini menyediakan fitur bahasa
Kotlin yang memungkinkan Anda menulis bahasa Kotlin yang ringkas dan idiomatis saat
melakukan pengembangan menggunakan Places SDK for Android.
KTX Places bersifat open source dan tersedia di
GitHub
bersama dengan contohnya.
Menginstal KTX untuk Places SDK
Agar dapat menginstal KTX untuk Places SDK for Android, tambahkan
dependensi berikut ke file build.gradle.kts level aplikasi Anda.
dependencies{// KTX for the Places SDK for Android libraryimplementation("com.google.maps.android:places-ktx:3.3.1")}
Mencoba contoh aplikasi
Repositori GitHub untuk library ini juga berisi aplikasi demo
yang menunjukkan cara penggunaan library KTX Places dalam aplikasi Anda.
Untuk mencoba aplikasi demo, ikuti langkah-langkah berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-02-25 UTC."],[[["Places Android KTX offers Kotlin extensions for streamlined Places SDK interaction using idiomatic Kotlin."],["Native 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."],["Developers can easily integrate Places KTX by adding the specified dependency to their app's `build.gradle.kts` file."],["A demo application within the GitHub repository provides practical examples of utilizing the Places KTX library."]]],["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"]]