Skip to content Skip to sidebar Skip to footer

Automatically Change Map Key Based On Debug Or Release Version

Sometimes I forget to change over from my debug Google map key when I compile my app. Is there a way to have it change automatically so that I don't have to manually change it in t

Solution 1:

The best thing you can do it not to have to change it at all.

First of all, you can check in the API_KEY into your repository even if it is public. Nobody can use the key without having your debug or release keystore (and passwords).

Secondly, you can assign a single API key multiple SHA-1;package pairs in the Google APIs Console.

Post a Comment for "Automatically Change Map Key Based On Debug Or Release Version"