Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using one Google Maps API key for different android applications

I just generated the Google Maps API key to use in my android app. I had to provide the SHA-1 fingerprint and the package name for the application. It looked something like this:

BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.android.mapexample

As you can see I had to provide the package name for the app. So, does this mean that I need to get a different API key for different applications?

PS: Curiously, somehow, Google generated two API keys for the SHA-1 and package name combination I entered. Is this normal? And so, which one should I use?

like image 714
Born Again Avatar asked Jun 25 '13 11:06

Born Again


1 Answers

You can use the same keystore and the API key for different applications.

  1. Use the same key to sign your apps.
  2. Add a line for each application in the Console page.

So, something like this:

BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.android.mapexample
BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.android.anotherapp
BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.temp.lastapp

And now, you can use the same API key with all these apps.

like image 155
Kumar Bibek Avatar answered Oct 15 '22 11:10

Kumar Bibek