[null,null,["อัปเดตล่าสุด 2025-08-12 UTC"],[[["\u003cp\u003eThis page provides instructions for setting up and running sample apps that demonstrate the use of the Places SDK for Android.\u003c/p\u003e\n"],["\u003cp\u003eThe sample apps are available in both Kotlin and Java, accessible through a GitHub repository.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to clone the repository, import the project into Android Studio, and configure your API keys to run the examples.\u003c/p\u003e\n"],["\u003cp\u003eThe provided samples showcase various functionalities like Place Autocomplete, offering a starting point for developing your own Android apps with Places SDK.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting information is included if the map doesn't display, guiding you to verify the API key configuration.\u003c/p\u003e\n"]]],[],null,["Select platform: [Android](/maps/documentation/places/android-sdk/examples \"View this page for the Android platform docs.\") [iOS](/maps/documentation/places/ios-sdk/examples \"View this page for the iOS platform docs.\") [JavaScript](/maps/documentation/javascript/examples \"View this page for the JavaScript platform docs.\")\n\nThe Places SDK for Android samples repository on\n[GitHub](https://github.com/googlemaps-samples/android-places-demos)\nincludes sample apps that demonstrate the use of the Places SDK for Android.\nImport and build the app, add your API key, view the demo, and use the sample code supplied as a\nstarting point for your app.\n\nWhen you run the sample app, it displays a list of available samples that you can\nrun on your own device. Select one of the options. For example, click\n**Place Autocomplete**.\n| **Troubleshooting:** If the sample app runs successfully but you don't see a map, check that you've added your API key to the app's manifest file, as described in [Using API Keys](/maps/documentation/places/android-sdk/get-api-key).\n\nClone and run the samples\n\nGit is required to run this sample locally. The following command clones the sample\napplication repository. \n\n```\ngit clone git@github.com:googlemaps-samples/android-places-demos.git\n```\n\nImport the sample project into Android Studio:\n\n1. In Android Studio, select **File \\\u003e New \\\u003e Import Project**.\n2. Go to the location where you saved the repository and select the project directory for\n Kotlin or Java:\n\n - **Kotlin** : \u003cvar translate=\"no\"\u003ePATH-REPO\u003c/var\u003e`/android-places-demos/demo-kotlin`\n - **Java** : \u003cvar translate=\"no\"\u003ePATH-REPO\u003c/var\u003e`/android-places-demos/demo-java`\n3. Select **Open**. Android Studio builds your project, using the Gradle build tool.\n4. In your top-level project directory, create a `secrets.properties` file.\n5. [Get an API key](/maps/documentation/places/android-sdk/get-api-key) from your project with the [Places API and/or Places API (New) enabled](/maps/documentation/places/android-sdk/cloud-setup#enabling-apis).\n6. In the `secrets.properties` file, add the following strings, replacing **YOUR_API_KEY** with the value of\n your API key:\n\n ```scdoc\n PLACES_API_KEY=YOUR_API_KEY\n MAPS_API_KEY=YOUR_API_KEY\n \n ```\n7. Run the app."]]