I've been developing a mobile app with Flutter and want to release it soon on the Play Store. It uses the Google Directions API, and now I want to restrict the API key to this specific application.
I was able to sign the app, and I've restricted the API key to Android apps with the package name of my app and the SH1A fingerprint of the key, both of which were double-checked.
The request gets denied anyways, both in debug mode (which I assume is intentional) and in release mode. I access the API via the dart HTTP package.
My theory is that this way the Directions API cannot recognize the package name or fingerprint of the app. Is that correct? Can I fix that by using the google_maps_webview package or something else instead?
Thanks in advance,
Paul