I have an Android application and I am using the Google geocoding API to get GPS coordinates for an address. Currently I am using the following URL which works correctly:
The problem is, will the above API continue to work after the Google's 'new pricing changes' starting July 16, 2018? According to the Google API documentation here, https://developers.google.com/maps/documentation/geocoding/intro#GeocodingResponses, the correct way to perform geocoding is using the following format:
I have tried using the suggested format (created a project, enabled billing, enabled the Places and Maps APIs, created an API key, added security to the key so that only my app can access the key) but when I use the suggested format I get the error,
This IP, site or mobile application is not authorized to use this API key
Reading other questions on StackOverflow, I found the following suggestions, among others:
- Creating a server key and using it instead of the API key
- Not adding restrictions to the API key
- Using the first format of the API request (without the API_KEY)
- Wait for 10 minutes until the new KEY becomes active
I tried all of them except 1 and none works. Regarding solution #1, according to the documentation, the API needs an API key so I cannot see why a Server key would work.
Solution 2 is risky, solution 3 is not certain that it will continue to work with the pricing changes and solution 4 does not work either (I waited for hours without success).
I even created a new API KEY and added no restrictions to it and I got a limit exceeded error.
Can anyone provide any help on this?
Geocoderclass (which should rely on user's quota) fail to operate in your case? developer.android.com/training/location/display-address - randomuser