This article explains how to manually request a Google Maps API key for your AppMachine app. This key is required in order to be able to publish your Android app.
- Navigate to https://console.cloud.google.com/ and login with the Google Play developer account on which you're planning to publish your app.
- After logging in, navigate to https://console.cloud.google.com/projectcreate and create a new project. (if you're an experienced Cloud Console user you can also opt to use an existing project)
- After the project has been created, open the API Library page via 'APIs & Services > Library'
- Search for the 'Maps SDK for Android' API and use the Enable button to enable it.
- When you've enabled the API, navigate to the 'APIs & Services > Credentials' page to create your API key.
- On the credentials page, use the Create Credentials button at the top of the screen to create a new API key.
- Use the 'Restrict Key' button to restrict the key for use in your Android app only.
- Give your API key a sane name so you can easily find it when needed. Select the 'Android apps' option from the Application restriction options, and use the 'Add an item' button to add your app's technical specifications to this API key.
* Note: You can obtain your app's package name and SHA1 hash via email@example.com.
- Enter your app's package name and SHA1 hash, and use the Done button to complete the process.
* Note: The package name and SHA1 hash below are examples. You can obtain your app's package name and SHA1 hash via firstname.lastname@example.org.
- Use the Save button at the bottom of the page to save the changes you've made to your API key.
- On the credentials overview page, use the copy button to copy the newly created and restricted API key.
Congratulations! You've just successfully created a Google Maps API key for your app.