जगहें Android KTX ओवरव्यू और सेटअप
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Places Android KTX, Android के लिए Places SDK के Kotlin एक्सटेंशन का कलेक्शन है. इन एक्सटेंशन में Kotlin भाषा की ऐसी सुविधाएं मिलती हैं जिनकी मदद से, Android के लिए Places SDK के लिए डेवलपमेंट करते समय, Kotlin में संक्षिप्त और मुहावरेदार कोड लिखा जा सकता है.
Places KTX, ओपन सोर्स है. यह
GitHub
पर उदाहरणों के साथ उपलब्ध है.
Places SDK के लिए KTX इंस्टॉल करना
Android के लिए Places SDK के लिए KTX इंस्टॉल करने के लिए, अपने ऐप्लिकेशन के लेवल वाली build.gradle.kts फ़ाइल में, ये डिपेंडेंसी जोड़ें.
dependencies{// KTX for the Places SDK for Android libraryimplementation("com.google.maps.android:places-ktx:3.5.0")}
सैंपल ऐप्लिकेशन आज़माना
इस लाइब्रेरी के लिए GitHub की रिपॉज़िटरी (डेटा स्टोर करने की जगह) में, एक डेमो
ऐप्लिकेशन
भी शामिल है. इससे पता चलता है कि अपने ऐप्लिकेशन में, Places KTX लाइब्रेरी का इस्तेमाल कैसे किया जा सकता है.
रूट डायरेक्ट्री में, एक फ़ाइल बनाएं जिसका नाम है
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"]],["आखिरी बार 2026-05-09 (UTC) को अपडेट किया गया."],[],["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"]]