Created
June 1, 2019 22:44
-
-
Save Ikhiloya/5cd7d73033d09717cfbbf78cb2c6588a to your computer and use it in GitHub Desktop.
Google Places Initialization in android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String apiKey = getString(R.string.api_key); | |
| /** | |
| * Initialize Places. For simplicity, the API key is hard-coded. In a production | |
| * environment we recommend using a secure mechanism to manage API keys. | |
| */ | |
| if (!Places.isInitialized()) { | |
| Places.initialize(getApplicationContext(), apiKey); | |
| } | |
| // Create a new Places client instance. | |
| PlacesClient placesClient = Places.createClient(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment