संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Places Android KTX, Places SDK for Android के लिए Kotlin एक्सटेंशन का कलेक्शन है. इन एक्सटेंशन से, Kotlin लैंग्वेज की ऐसी सुविधाएं मिलती हैं जिनकी मदद से, Places SDK for Android के लिए डेवलपमेंट करते समय, कम शब्दों में और सही तरीके से Kotlin कोड लिखा जा सकता है.
Places KTX एक ओपन सोर्स है और यह GitHub पर उदाहरणों के साथ उपलब्ध है.
Places SDK के लिए KTX इंस्टॉल करना
Places SDK for Android के लिए KTX इंस्टॉल करने के लिए, अपने ऐप्लिकेशन-लेवल की build.gradle.kts फ़ाइल में ये डिपेंडेंसी जोड़ें.
dependencies{// KTX for the Places SDK for Android libraryimplementation("com.google.maps.android:places-ktx:3.3.1")}
सैंपल ऐप्लिकेशन आज़माकर देखें
इस लाइब्रेरी के लिए GitHub रिपॉज़िटरी में, डेमो ऐप्लिकेशन भी शामिल है. इससे पता चलता है कि अपने ऐप्लिकेशन में Places KTX लाइब्रेरी का इस्तेमाल कैसे किया जा सकता है.
डेमो ऐप्लिकेशन आज़माने के लिए, यह तरीका अपनाएं:
GitHub से, ZIP फ़ाइल को क्लोन करें या डाउनलोड करें.
Android Studio में, File -> Open चुनें. इसके बाद, उस डायरेक्ट्री पर जाएं और उस फ़ोल्डर को खोलें जिसे आपने अभी-अभी क्लोन या डाउनलोड किया है.
रूट डायरेक्ट्री में, secrets.properties नाम की फ़ाइल बनाएं. आपकी एपीआई कुंजी को सुरक्षित रखने के लिए, इस फ़ाइल को वर्शन कंट्रोल में नहीं रखा जाना चाहिए.
इस लाइन को secrets.properties में जोड़ो
PLACES_API_KEY="YOUR_API_KEY"
यहां YOUR_API_KEY वह एपीआई पासकोड है जो आपको पहले चरण में मिला था. उदाहरण के तौर पर, local.defaults.properties को देखा जा सकता है.
रन कॉन्फ़िगरेशन में जाकर, app-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-07-24 (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"]]