Search code examples
androidgoogle-mapsapi-key

Google API Key still in use after deletion


I'm having a weird issue with an app and maybe there's something I don't know that's causing it...

I did a simple app (OldApp) which uses Google Maps and it worked fine. I then tried to do a second app (NewApp) using Maps, so I got a new API Key for it, renamed the packages, etc.

My problem was that the map wasn't being shown in NewApp, I just had a light yellowish image with Google's logo. After checking that everything was ok with the keys and names, I deleted the key for the OldApp that I'd setup before, to make sure it wasn't somehow "blocking" something.

Now, my OldApp (for which there's no key signed) is still showing the map ! I even set the key as :

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

Meanwhile my NewApp is still not working.

So, is there a reason for this behaviour ? Does it take some time for the keys to update maybe?

Thank you in advance, and let me know if it's not clear or if there's something I could add.


Solution

  • As to why it kept working, the answer was provided here : https://stackoverflow.com/a/20049864/3802589 , basically the key was still in memory.

    As to why the new map wouldn't load the map, it was just because Wifi Direct kept turning off Wifi and therefore it couldn't load the tiles.