I'm using Google Maps API and Direction API in my android app. When I compile it, it gives me the following error for the function onRoutingFaliure.
This IP, site or mobile application is not authorized to use this API key. Request received from IP address XX.XX.XX.XX, with empty referer
public void onRoutingFailure(RouteException e) {
if(e != null) {
Toast.makeText(this, "Error: " + e.getMessage(), Toast.LENGTH_LONG).show();
}else {
Toast.makeText(this, "Something went wrong, Try again", Toast.LENGTH_SHORT).show();
}
}
How can I resolve this?