Generate Maps Api Key Android

Jul 15, 2019  This video will show you how to generate the API key for accessing google maps in android applications. This video will show you how to generate the API key for accessing google maps in android. Mar 03, 2020  To create an API key: Navigate to the APIs & Services→Credentials panel in Cloud Console. Select Create credentials, then select API key from. Apr 10, 2020 On the Credentials page, click Create credentials API key. The API key created dialog displays your newly created API key. The new API key is listed on the Credentials page under API keys. (Remember to restrict the API key before using it in production.) Add the API key to your request. You must include an API key with every Maps. Apr 10, 2020  Get Started Step 1. Download Android Studio. Follow the guides to download and install Android Studio. Install the Google Play services SDK. Add Google Play services to Android Studio. Create a Google Maps project. Start Android Studio. Get a Google Maps API key.

If you want to use Google Maps in your Xamarin.Android app, you will need to obtain an API key. It’s easy to generate an API Key, but we will also want to restrict it’s usage, so that only your app can use it. This alleviates the security concern of placing the API Key in your app, and someone taking it for their own use.

Create Google Maps API Key

  1. Go to the Google Developers Console
  2. Click Create Project (If you don’t already have one, otherwise it defaults to an existing project). If you have an existing project, but want to create a new one, click the drop down, then the + button.
  3. Click ENABLE APIS AND SERVICES
  4. Click Google Maps Android API
  5. Then click enable
  6. Click Credentials, in the Menu, then click Create credentials and select API key

This is your API key that you can use in your Android app.

In your AndroidManifest.xml file, inside the application tag, place your API Key.

Restrict Key Access

This API Key is now available, but can be used with anyone who has access to it. If you are using it Server side, then the security issues aren’t too great. However, if you need to distribute this with your app, then it is best to restrict this, so only your app can use it.

Generate Fingerprint

We first need to generate a fingerprint. This is done via the command or terminal line. And is in this format.

For windows, you will find the debug values for your keystore here, and the default path for the Java SDK. You will need to go to this path, in the commandline to run the keytool.

  • [STORE FILENAME] = C:Users[USERNAME]AppDataLocalXamarinMono for Androiddebug.keystore
  • C:Program Files (x86)Javajdk[VERSIONNUMBER]bin

For a Mac, they will be as follows.

  • [STORE FILENAME] = /Users/[USERNAME]/.local/share/Xamarin/Mono for Android/debug.keystore
  • /System/Library/Java/JavaVirtualMachines/[VERSIONNUMBER].jdk/Contents/Home/bin/keytool

The debug values you will also want are

  1. [ALIAS NAME] = androiddebugkey
  2. [STORE PASSWORD] = android
  3. [KEY PASSWORD] = android

Here is an example, for myself in Windows.

The example output, you will get is.

What you want is the SHA-1 signature.

Add App Restriction

Now, lets go back to the developer console.

  1. Edit the API Key.
  2. Add the fingerprint, and your Xamarin.Android apps package name, and save.

Please note, that this has shown you how to do it, for a debug version. Create a new Fingerprint, against your production Keystore, before you deploy this to the PlayStore.

This article covers creating a Google Maps API key inWP Google Maps.

Option 1: Using our Cloud API Key

For: Standard Users

Navigate over to our Cloud API Key purchase page and get an API key with the click of a button.

Option 2: Creating a Google Maps API Key

For: Technical Users

Getting Started

Navigate to the Google Maps Platform and click on the Get Started button in the top right corner of the site.

Enable Google Maps Platform

Select the Maps, Routes and Places check boxes and press continue.

Select a Project

If this is your first time creating an API key, you will have to create a Project first.

  • Give your Project a name.
  • Click the next button at the bottom-right of the window.


Set up your billing

Wait for the billing prompt and select Create Billing Account


Select your country and accept Terms of Service. Click Continue.

Enter your customer info (details) and card information.

Select START MY FREE TRIAL.

Please note that you a 12-month or $300 credit free trial. When this free trial ends, you will get up to 28 000 map requests per month and 40 000 direction calls per month, free of charge. You will only be billed when your usage exceeds your monthly $200 credit limit.

For more information about the free trial, please refer to Google’s documentation.

Once your billing has been set up, you can move onto creating your API Key.


Generate Your API Key

You will now receive your API Key

  • Copy the API key to your clipboard.
  • Return to your WordPress site and paste the API Key into the box labeled “Google Maps API Key” at the top of the page at WordPress Dashboard → Maps→ Settings→ Advanced.
  • Click the Save Settings button.

After pasting the API Key to your WordPress site and saving the settings, return to the Google API Manager. You will want to restrict access to your API Key to avoid having it “hijacked” and going over your quota. Click the API Console link on the Enable Google Maps Platformwindow as shown above.

Generate Maps Api Key Android Phone

Select HTTP referrers (web sites) and enter the following domains under Accept requests from these HTTP referrers (web sites) replacing yourdomain.com with your domain name.

Please note that the Google Maps API is very specific about how this field is formatted – please use exactly this format.

Generate Map Api Key

Click the Save button to save your Key Restrictions.


Enable Required API Functions

Now you need to enable the required API functions for your project. Click the Library link in the API Manager sidebar menu. Click on the Google Maps JavaScript API panel.

The JavaScript API will probably already be enabled as shown in the screenshot below. If the JavaScript API is not enabled, then click Enable on the Google Maps Javascript API window.

The following is a quick list of all the APIs that need to be enabled along with your JavaScript API:

Generate Maps Api Key Android Download

  • Google Maps JavaScript API
  • Google Maps Geocoding API
  • Google Places API
  • Google Maps Directions API

API Changes Introduced By Google

Recently, Google Maps have announced certain API changes that will affect everyone using Google Maps. Essentially, Google has implemented new pay-as-you-go pricing plans for their API. On this plan mention, users will get up to 28 000 map requests per month and 40 000 direction calls per month, free of charge.

Generate maps api key android download

Other rates and limits found here.

The only thing required from existing users, is to add a credit card to their Google Console account if they haven’t done so already. Unfortunately, the changes introduces are completely out of our control. However, WP Google Maps will be implementing an Open Street Maps integration for the users that would like an alternative solution to Google Maps.

Generate Google Map Api Key Android

For more information and questions on this topic, please refer to the FAQ for the new Google Maps API changes.

Generate Api Key For Google Maps

This article covered creating a Google Maps API key inWP Google Maps. If you need further assistance or are having other issues with the plugins, feel free to visit our Support Desk.

Generate Maps Api Key Android Software

Was this article helpful to you?