Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update README per template #793

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 58 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
Google Places SDK for Android Demos
====================================
![GitHub contributors](https://img.shields.io/github/contributors/googlemaps/android-places-demos)
![Apache-2.0](https://img.shields.io/badge/license-Apache-blue)
[![Discord](https://img.shields.io/discord/676948200904589322)](https://discord.gg/hYsWbmk)
[![Build](https://github.com/googlemaps-samples/android-places-demos/actions/workflows/build.yml/badge.svg)](https://github.com/googlemaps-samples/android-places-demos/actions/workflows/build.yml)

This repo contains the following apps that demonstrate use of the [Google Places SDK for Android](https://developers.google.com/places/android-sdk/):
![GitHub contributors](https://img.shields.io/github/contributors/googlemaps-samples/android-places-demos?color=green)
[![GitHub License](https://img.shields.io/github/license/googlemaps-samples/android-places-demos?color=blue)][license]
[![StackOverflow](https://img.shields.io/stackexchange/stackoverflow/t/google-places-api?color=orange&label=google-places-api&logo=stackoverflow)](https://stackoverflow.com/questions/tagged/google-places-api)
[![Discord](https://img.shields.io/discord/676948200904589322?color=6A7EC2&logo=discord&logoColor=ffffff)][Discord server]

# Google Places SDK for Android sample applications

## Description

This repo contains sample apps demonstrating use of the [Google Places SDK for Android][places-sdk].

## Samples in this repo

1. [demo-kotlin](demo-kotlin) Kotlin demo app for the Places SDK.
2. [demo-java](demo-java) Java demo app for the Places SDK.
1. [demo-java](demo-java) Java demo app for the Places SDK.

Note that each folder contains a distinct sample and must be imported separately. Each project also contains two Gradle product flavors:

1. `gms`: Product flavor for samples using the Places SDK that uses Maps SDK for Android
1. `gms`: Product flavor for samples using the Places SDK that uses Maps SDK for Android
2. `v3`: Product flavor for samples using the Places SDK that uses Maps SDK V3 BETA for Android

Additionally, the [snippets](snippets) app contains code snippets used for documentation found in https://developers.google.com/places/android-sdk

Getting Started
---------------
## Requirements

To run the samples, you will need:

- To [sign up with Google Maps Platform]
- A Google Maps Platform [project] with the **Places SDK for Android** enabled
- An [API key] associated with the project above ... follow the [API key instructions] if you're new to the process
- Java 21+ or Kotlin
- Android API level 23+ (35+ recommended)
- Gradle

## Running the sample(s)

These demos use the Gradle build system.

Expand All @@ -27,39 +44,43 @@ In Android Studio, use the "Open an existing Android Studio project", and select

Alternatively use the `./gradlew build` command to build the project directly.

The demos also require that you add your own API key:
1. [Get an API Key](https://developers.google.com/places/android-sdk/get-api-key).
2. Open the `local.properties` file in either demo project
3. Add a single line to `local.properties` that looks like `PLACES_API_KEY=YOUR_API_KEY`, where `YOUR_API_KEY` is the API key you obtained in the first step. You can also take a look at `local.defaults.properties` as an example.
4. Build and run.
1. Open the `local.properties` file in either demo project
1. Add a single line to `local.properties` that looks like `PLACES_API_KEY=YOUR_API_KEY`, where `YOUR_API_KEY` is the API key you obtained earlier. You can also take a look at `local.defaults.properties` as an example.
1. Build and run

## Contributing

Contributions are welcome and encouraged! If you'd like to contribute, send us a [pull request] and refer to our [code of conduct] and [contributing guide].

## Terms of Service

Support
-------
This sample uses Google Maps Platform services. Use of Google Maps Platform services through this sample is subject to the Google Maps Platform [Terms of Service].

- Stack Overflow: https://stackoverflow.com/questions/tagged/google-places-api
This sample is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service, e.g., [Technical Support Services Guidelines], Service Level Agreement ["SLA"][SLA], and [Deprecation Policy], do not apply to the code in this sample.

If you've found an error in these samples, please file an issue:
https://github.com/googlemaps/android-places-demos/issues
## Support

Patches are encouraged, and may be submitted according to the instructions in
CONTRIBUTING.md.
This sample is offered via an open source [license]. It is not governed by the Google Maps Platform Support Technical Support Services Guidelines, the SLA, or the Deprecation Policy. However, any Google Maps Platform services used by the sample remain subject to the Google Maps Platform Terms of Service.

License
-------
If you find a bug, or have a feature request, please [file an issue] on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our [developer community channels]. If you'd like to contribute, please check the [contributing guide].

Copyright 2019 Google, Inc.
You can also discuss this sample on our [Discord server].

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for
additional information regarding copyright ownership. The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
[places-sdk]: https://developers.google.com/places/android-sdk
[API key]: https://developers.google.com/maps/documentation/android-sdk/get-api-key
[API key instructions]: https://developers.google.com/maps/documentation/android-sdk/config#step_3_add_your_api_key_to_the_project

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
[code of conduct]: ?tab=coc-ov-file#readme
[contributing guide]: CONTRIBUTING.md
[Deprecation Policy]: https://cloud.google.com/maps-platform/terms
[developer community channels]: https://developers.google.com/maps/developer-community
[Discord server]: https://discord.gg/hYsWbmk
[file an issue]: https://github.com/googlemaps-samples/android-places-demos/issues/new/choose
[license]: LICENSE
[project]: https://developers.google.com/maps/documentation/android-sdk/cloud-setup#enabling-apis
[pull request]: https://github.com/googlemaps-samples/android-places-demos/compare
[Sign up with Google Maps Platform]: https://console.cloud.google.com/google/maps-apis/start
[SLA]: https://cloud.google.com/maps-platform/terms/sla
[Technical Support Services Guidelines]: https://cloud.google.com/maps-platform/terms/tssg
[Terms of Service]: https://cloud.google.com/maps-platform/terms