{"id":28919519,"url":"https://github.com/googlemaps/android-places-compose","last_synced_at":"2025-10-03T13:54:22.772Z","repository":{"id":254192988,"uuid":"836962804","full_name":"googlemaps/android-places-compose","owner":"googlemaps","description":"Android Places Compose Library","archived":false,"fork":false,"pushed_at":"2025-09-16T00:22:44.000Z","size":1076,"stargazers_count":18,"open_issues_count":4,"forks_count":3,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-09-16T02:30:44.706Z","etag":null,"topics":["android","google-maps","google-places","kotlin","places-sdk","samples"],"latest_commit_sha":null,"homepage":"https://developers.google.com/places/android-sdk/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googlemaps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-01T23:35:35.000Z","updated_at":"2025-09-16T00:22:46.000Z","dependencies_parsed_at":"2024-11-19T13:17:40.822Z","dependency_job_id":"d676445a-a05f-41d4-8438-b2391e1ee565","html_url":"https://github.com/googlemaps/android-places-compose","commit_stats":null,"previous_names":["googlemaps/android-places-compose"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/googlemaps/android-places-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fandroid-places-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fandroid-places-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fandroid-places-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fandroid-places-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlemaps","download_url":"https://codeload.github.com/googlemaps/android-places-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps%2Fandroid-places-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278173363,"owners_count":25942293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","google-maps","google-places","kotlin","places-sdk","samples"],"created_at":"2025-06-22T03:41:48.258Z","updated_at":"2025-10-03T13:54:22.767Z","avatar_url":"https://github.com/googlemaps.png","language":"Kotlin","readme":"![Maven Central Version](https://img.shields.io/maven-central/v/com.google.maps.android/places-compose)\n![Static Badge](https://img.shields.io/badge/release-alpha-orange) ![GitHub License](https://img.shields.io/github/license/googlemaps/android-places-compose)\n\n\n# Android Places Compose Library (Alpha)\n\n## Description\n\nThis is a Jetpack Compose library for the Google Maps Platform Places SDK for Android. It provides a\nreusable Place Autocomplete composable based on the [new Places API](https://mapsplatform.google.com/resources/blog/the-next-generation-of-autocomplete-is-now-generally-available/).  \n\nAdditionally, there is a [sample app](https://github.com/googlemaps/android-places-compose/tree/main/places-compose-demo) showing how to use the widget as well as demonstrating \n[Address Descriptors](https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors)\nand address entry.\n\n## Requirements\n\n* Android API 24 (or newer) (Android 7.0 Nougat)  \n* Android Studio (Koala or newer recommended)\n* A Google Maps Platform [API key](https://developers.google.com/maps/documentation/places/android-sdk/get-api-key) from a project with the [**Places API (New)** enabled](https://developers.google.com/maps/documentation/places/android-sdk/cloud-setup#enabling-apis).\n\n## Installation\n\nAdd the dependency below to your **module-level** Gradle build file:\n\n### Kotlin (`build.gradle.kts`)\n\n```kotlin\ndependencies {\n    implementation(\"com.google.maps.android:places-compose:0.1.3\")\n}\n```\n\n### Groovy (`build.gradle`)\n\n```groovy\ndependencies {\n    implementation 'com.google.maps.android:places-compose:0.1.3'\n}\n```\n\n## Sample App\n\nThis repository includes a full-featured [demo app](https://github.com/googlemaps/android-places-compose/tree/main/places-compose-demo) that demonstrates how to use the library. To run the demo app, follow these steps:\n\n1. Clone the repository\n2. [Get a Places API key][api-key]\n3. Copy `local.defaults.properties` to a new file in the same folder `secrets.properties` and replace `DEFAULT_API_KEY` with your API key(s). (Note: this file should *NOT* be\n   under version control to protect your API key)\n4. Build and run\n\n## Usage\n\n### Place Autocomplete\n\nThe `PlacesAutocompleteTextField` composable provides a text field for place autocomplete. As the\nuser types, the composable will show a list of \n[Places Autocomplete suggestions](https://developers.google.com/maps/documentation/places/android-sdk/place-autocomplete)\nthat the user can select from.\n\nSee PlacesAutocompleteMinimalActivity for a very minimal working example.\n\n```Kotlin\nclass PlacesAutocompleteMinimalActivity : ComponentActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        Places.initializeWithNewPlacesApiEnabled(this, BuildConfig.PLACES_API_KEY)\n        val placesClient = Places.createClient(this)\n\n        val bias: LocationBias = RectangularBounds.newInstance(\n            LatLng(39.9, -105.5), // SW lat, lng\n            LatLng(40.1, -105.0) // NE lat, lng\n        )\n\n        setContent {\n            val searchTextFlow = MutableStateFlow(\"\")\n            val searchText by searchTextFlow.collectAsStateWithLifecycle()\n            var predictions by remember { mutableStateOf(emptyList\u003cAutocompletePrediction\u003e()) }\n\n            LaunchedEffect(Unit) {\n                searchTextFlow.debounce(500.milliseconds).collect { query : String -\u003e\n                    val response = placesClient.awaitFindAutocompletePredictions {\n                        locationBias = bias\n                        typesFilter = listOf(PlaceTypes.ESTABLISHMENT)\n                        this.query = query\n                        countries = listOf(\"US\")\n                    }\n                    predictions = response.autocompletePredictions\n                }\n            }\n\n            AndroidPlacesComposeDemoTheme {\n                Scaffold(\n                    topBar = {\n                        TopAppBar(\n                            title = { Text(\"Places Autocomplete\") }\n                        )\n                    }\n                ) { paddingValues: PaddingValues -\u003e\n                    PlacesAutocompleteTextField(\n                        modifier = Modifier.fillMaxSize().padding(paddingValues),\n                        searchText = searchText,\n                        predictions = predictions.map { it.toPlaceDetails() },\n                        onQueryChanged = { searchTextFlow.value = it },\n                        onSelected = { autocompletePlace : AutocompletePlace -\u003e\n                            // Handle the selected place\n                            Toast.makeText(\n                                this@PlacesAutocompleteMinimalActivity,\n                                \"Selected: ${autocompletePlace.primaryText}\",\n                                Toast.LENGTH_SHORT\n                            ).show()\n                        },\n                    )\n                }\n            }\n        }\n    }\n}\n```\n\n\u003e **_NOTE:_**  This sample is for demonstration purposes.  Please follow Android best practices when\n\u003e building production ready apps. \n\n### Landmark Selection\n\nThe demo code shows how to use [address descriptors](https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors)\nto assist in locating an address.  Note that address descriptors are not available in all locations.\n\n## Contributing\n\nContributions are welcome and encouraged\\! See [contributing] for more info.\n\n## Terms of Service\n\nThis library uses Google Maps Platform services. Use of Google Maps Platform services through this library is subject to the Google Maps Platform [Terms of Service](https://cloud.google.com/maps-platform/terms).\n\nIf your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](https://developers.google.com/maps/comms/eea/faq).\n\nThis library is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service (e.g. Technical Support Services, Service Level Agreements, and Deprecation Policy) do not apply to the code in this library.\n\n## Support\n\nThis library is offered via an open source license. It is not governed by the Google Maps Platform Support [Technical Support Services Guidelines](https://cloud.google.com/maps-platform/terms/tssg), the [SLA](https://cloud.google.com/maps-platform/terms/sla), or the [Deprecation Policy](https://cloud.google.com/maps-platform/terms) (however, any Google Maps Platform services used by the library remain subject to the Google Maps Platform Terms of Service).\n\nThis library adheres to [semantic versioning](https://semver.org/) to indicate when backwards-incompatible changes are introduced. Accordingly, while the library is in version 0.x, backwards-incompatible changes may be introduced at any time.\n\nIf you find a bug or have a feature request, please [file an issue].\nOr, if you'd like to contribute, send us a [pull request] and refer to our [code of conduct] and [contributing] guide.\n\nYou can also reach us on our [Discord channel].\n\n[api-key]: https://developers.google.com/places/android-sdk/get-api-key\n[Discord channel]: https://discord.gg/hYsWbmk\n[code of conduct]: CODE_OF_CONDUCT.md\n[file an issue]: https://github.com/googlemaps/android-places-compose/issues/new/choose\n[code of conduct]: CODE_OF_CONDUCT.md\n[contributing]: CONTRIBUTING.md\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglemaps%2Fandroid-places-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglemaps%2Fandroid-places-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglemaps%2Fandroid-places-compose/lists"}