Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Google map Api key need to change frequently

I am facing an issue that I have created api key for google maps with debug and release key SHA like this :

enter image description here

And updated that key in my manifest

<meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyBY34afkPU6TRw5v9yM1wqI3vFbk90zMt0" />

with all required permissions but after every few days google map looks blanks Like this :

enter image description here

After changing key in my manifest map is visible. My question is why I need to change this API key after every few days?

like image 389
Apurva Kolapkar Avatar asked Jun 26 '15 06:06

Apurva Kolapkar


1 Answers

If you use debug key and publish app, it will be blank. when checking export-> application-> map will be blank because you use debug keystore. To use production key, follow this step.

While signing app,ie in production, you want to use release key. For that you want to compare that with signed apk

Step 1:

Say for example your apk name is A and you are signing and creating a keystore for A.apk ie A.keystore will be created in some drive location.Let's consider it in E drive.

step 2:

Now locate to jdk in C drive(Considering for windows and assigning C drive)

C:\Program Files\Java\jdk1.7.0\bin>keytool -list -v -keystore E:\A.keystore -alias A

So it will create SHA-1 finger print

copy and paste that in google map console, it wll generate a key.use it in maps.

like image 183
Shadow Avatar answered Sep 17 '22 08:09

Shadow