Sometimes when I try to use the Google MAPS API KEY to get a URL to draw a 'polyline', i get an error in my logs:
"error_message":"Keyless access to Google Maps Platform is deprecated. Please use an API key with all your API calls to avoid service interruption. For further details please refer to http://g.co/dev/maps-no-account","routes":[],"status":"OVER_QUERY_LIMIT"
I have this in my manifest:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="MY_GOOGLE_MAPS_API_KEY" />
Also, this API KEY 'enabled' in my API CONSOLE and it is restricted to Google Maps Android SDK and Directions API. I also have billing enabled for my Google API CONSOLE but I still get this error sometimes.
String url = "https://maps.googleapis.com/maps/api/directions/"+output+"?"+parameters;
But to fix it, I did this:String url = "https://maps.googleapis.com/maps/api/directions/"+output+"?"+parameters + "&key=" + MY_API_KEY;
I guess google reccomends us to use API Key directly in these sort of JSON requests to prevent quota errors. – grantespo