Google directions returns REQUEST_DENIED when called from Android

hi. i have problem wiht google map direction API. i get an API , restrict it and use it in my android app it’s ok for showing map but for navigating between to places in debug mode i get this error
< [Google directions returns REQUEST_DENIED when called from Android]>
i’m searching for 3 days and completely get confused
i need billing for that? or have a new API based on server mod for direction services in android? or another way?
please help me. beforehand thank’s a lot

You need to have a Google Map api account to use the directions api since about late 2018.

https://developers.google.com/maps/documentation/directions/start You need an account. You must provide Google with credit card information. The api is not free however Google allow a limited amount of credit (free usage). Your app must be linked to the account and you will be ‘charged’ for usage each time the app sends a request. Sorry, no free lunch as with the previous Google usage policy Roya.

So bad my country boycotted with google. is there any solution for this?
Thank’s for you’r response Steve

It is not a boycott. Everyone must pay these fees if they want to use these Google services. A reasonable amount of usage for personal use and testing is ‘free’…just sign up, provide a credit card and start coding. :slight_smile:

You are building an app; use a free tool and expect everything else for free and expect to make money?

Here are some cheap solutions (NONE of them are as accurate and good as Google):

Alternatives to Google Directions , these include:

  1. Use the ActivityStarter to use Google Navigate. This is free . see the link above.
  2. Using OpenStreetMaps OpenStreetMaps provides free distance/route information. HOW TO use the new Map Control. plot a route and post driving distance and time describes how to use it. It is a ‘free’ service however excessive usage will get charged. Please have a look at the API Usage Policy before you use it. Or do something similar using the OSM web site and App Inventor OpenStreetMap without the Map Component
  1. You might be able to use MapQuest Open Directions API Web Service offers a limited number of transactions free per month.

  2. https://www.graphhopper.com/ is NOT free

What works for you? Smile, there are alternatives.

thank’s a lot for great response steve :slightly_smiling_face: