If you already have the key got the link below and add the fingerprint along with your android project package name

You also need to login to your google account

https://code.google.com/apis/console

Click on create new key. Add the fingerprint along with your android project package name.

You can see the api key above

Enable google map api v2 from services tab.

Then in manifest file under application tag

 <meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my key"/>
Answer from Raghunandan on Stack Overflow
🌐
Google
developers.google.com › google maps platform › android › maps sdk for android › set up the maps sdk for android
Set up the Maps SDK for Android | Google for Developers
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-12-18 UTC."],[],["To use the Maps SDK, you need an API key, created via the Google Cloud Console or Cloud SDK.
🌐
Google
developers.google.com › google maps platform › web › maps embed api › set up the maps embed api
Set up the Maps Embed API | Google for Developers
To create one, go to the Google Maps Platform Credentials page and select \"Create credentials\" then \"API key.\" Restrict your key via the Credentials page, selecting \"HTTP referrers\" for application restrictions and choosing specific APIs ...
🌐
GeeksforGeeks
geeksforgeeks.org › android › how-to-generate-api-key-for-using-google-maps-in-android
How to Generate API Key for Using Google Maps in Android? - GeeksforGeeks
July 23, 2025 - Now you can use this API for using maps. But this key is used by anyone in any of the projects. So we have to restrict the API key for our own project so that anyone cannot use this API key inside their app. ... To restrict your API click on Restrict key option. After clicking on this option you will get to see the below screen. Inside this screen click on Android apps and click on Add an item option and after that, you will get to see the below screen.
🌐
Alphatech
alphatech.technology › Howto-Entry-srk › How-to-Google-Maps-API-Key-bek
How to obtain a Google Maps API Key
To use the Google Maps functionality in Android, you need to register for a Maps API key with Google. Until you do this, you will just see a blank grid instead of a map in your applications. You must obtain a Google Maps Android API v2 key.
🌐
Appunite
tech.appunite.com › posts › how-to-securely-use-google-maps-api-key-in-android-i-os-or-flutter-project
How to securely use Google Maps API Key in Android, iOS, or Flutter Project | Appunite Tech Blog
According to Google Documentation to store API keys securely it is recommended to use local properties. If you don’t have the file local.properties in your project, it should be located in the android project root directory. Make sure to add it to intentionally untracked files in your version control tool. Now you can add here a new variable. Note that the value of the key should NOT be wrapped by either single or double quote characters. googleMapsApiKey=YOUR_GOOGLE_MAPS_API_KEY_STRING_VALUE
🌐
Reddit
reddit.com › r/androiddev › using google maps on android: do we really need to have to insert the api key inside the android manifest? is that dangerous? how to protect yourself?
r/androiddev on Reddit: Using google maps on android: Do we really need to have to insert the API key inside the android Manifest? Is that dangerous? How to protect yourself?
March 17, 2025 -

Hello, I am about to use for the first time the google map api for android,

And apparently in order to display the app in your app context, you need to have the API key defined in the android manifest like this:

<meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="YOUR_API_KEY_HERE"/>
  • Isn't there any other way?

  • Isn't that dangerous? People can get your api key.

  • I read about restricting the api to your app, but is that enough? Are there bad stories about people who had a misadventure of missused map APIs? Despite restricting?

  • What other solutions to protect yourself from your API key abuse?

🌐
Reddit
reddit.com › r/androiddev › how to secure google map api key
r/androiddev on Reddit: How to secure google map api key
October 16, 2024 -

As far as i ve checked, the api key should be in android manifest which will be used by the MapView that we are using in the app. But the problem is if i decompile my app, i can see my api key in the manifest.

I even checked the apk (cloned the repo found in android documentation website itself which has the example on implementing maps in project), its the same.

How to secure it? I saw that we can use google console and we can restrict the use of api, but still the api should be set in manifest and still it can be decompiled and misused. How to solve this?

Find elsewhere
🌐
Utk
eagle.phys.utk.edu › guidry › android › apiKey.html
The Maps API Key
Now we need to insert a tag in the project Manifest file that specifies this key so that the maps server will know that you have permission to download map data. Copy the key from the webpage above, open the AndroidManifest.xml file for your project, and insert the following tag inside the <application>...</application> tag. <!-- GoogleMaps api key--> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="api_key" />
🌐
Embarcadero
docwiki.embarcadero.com › RADStudio › Sydney › en › Configuring_Android_Applications_to_Use_Google_Maps
Configuring Android Applications to Use Google Maps - RAD Studio
Click Create. Google API Console displays the API key window with a forty-character API key, for example: API key: AIzaSyCMuJ2w8_gQEedvqUg-9lxWXFg7feAl9PQ · For your Android application to access Google Maps, ensure that you have configured the following project options and permissions:
🌐
Google
developers.google.com › google maps platform › android › maps sdk for android › maps sdk for android quickstart
Maps SDK for Android Quickstart | Google for Developers
Caution: The AndroidManifest.xml file contains instructions on getting a Google Maps API key and then adding it to your local.properties file. Do not add your API key to the local.properties file. Doing so stores your API key less securely.
🌐
DEV Community
dev.to › paulfranco › securing-and-injecting-google-maps-api-key-in-an-android-app-14kp
Securing and Injecting Google Maps API Key in an Android App - DEV Community
March 3, 2025 - GOOGLE_MAP_API_KEY=your_actual_google_maps_api_key · Add secrets.properties to .gitignore to ensure it is not committed to the repository: ... Now, the API key is stored securely and will not be pushed to GitHub or shared in version control. Since we need to use this API key within Gradle, we need to load it from secrets.properties. Modify the build.gradle.kts file and add the following snippet before the android block:
🌐
Google
developers.google.com › google maps platform › web › maps javascript api › set up the maps javascript api
Set up the Maps JavaScript API | Google for Developers
To create an API key, navigate to the Google Maps Platform Credentials page and select \"Create credentials \\\u003e API key.\" Restricting API keys to specific applications and APIs is strongly recommended for security and to prevent financial ...
🌐
Kony
docs.kony.com › docs › visualizer › visualizer_user_guide › Content › Generating_Map_Keys.htm
Generating and Configuring Map API Keys
You will need Maps API Key for Maps to work in the applications you develop. You need to generate the Maps API key and specify it in the properties of the Map widget. You need to configure the following map keys for your application: ... Google Map key for Android (exclusive key for Android platform).
🌐
Google Maps Platform
mapsplatform.google.com › resources › blog › google-maps-platform-best-practices-restricting-api-keys
Blog: Google Maps Platform best practices: Restricting API keys – Google Maps Platform
API keys are the primary way we authenticate access to Google Maps Platform APIs and SDKs. Here's a rundown on the key restrictions available, best practices, and a video tutorial on how to restrict your keys.
🌐
B4X
b4x.com › home › forums › b4a - android › android questions
Android Question google map API key
May 14, 2023 - Click to expand... Is the Googlesearch defect? You get them from the Google Cloud Console ... Click to expand... Tools - Private Sign Key ... If you find my answer useful please click on like.
🌐
Google Support
support.google.com › maps › thread › 335638657 › how-to-restrict-my-google-maps-api-key-and-track-where-it-s-being-used
How to Restrict My Google Maps API Key and Track Where It's Being Used? - Google Maps Community
Skip to main content · Google Maps Help · Sign in · Google Help · Help Center · Community · Google Maps · Terms of Service · Submit feedback · Send feedback on
🌐
Set Compass
setcompass.com › How-to-Get-Google-Maps-API-Key-Guide.htm
How to get your Google Maps API key (Tutorial)
This tutorial provides a step-by-step guide for quickly obtaining a Google Maps API key.
🌐
Google
docs.cloud.google.com › application development › google cloud sdk › authentication › manage api keys
Manage API keys | Authentication | Google Cloud Documentation
To obtain the key_id, you can also use the lookup api: client.lookup_key() Returns: response: Returns the updated API Key. """ # Create the API Keys client. client = api_keys_v2.ApiKeysClient() # Specify the android application's package name ...