Android Question [SOLVED] API_KEY I missing someting

yfleury

Active Member
Licensed User
Longtime User
I all
I have this in manifest
B4X:
AddApplicationText(
<meta-data
  android:name="com.google.android.geo.API_KEY"
  android:value="AIzaSyCPX4Q........"/>)

But my link to google api can't get api key.
I have to set my api key like that to work
B4X:
Sub Process_Globals
    Public API_KEY As String ="AIzaSyCPX4......."

But google don't like that because app that contain exposed Google Cloud Platform (GCP) API key(s)

What can I do to resolved this security issue?
 

DonManfred

Expert
Licensed User
Longtime User
I have this in manifest
googlemap is using this key.
I have to set my api key like that to work
if you call the api with okhttputils2 then you need to do that this way, correct.
But google don't like that because app that contain exposed Google Cloud Platform (GCP) API key(s)
Google don´t like it because you have NOT RESTRICTED your Key to only use in your app.

Go to the google console, edit the key, add restrictions to it. <- And this is what google suggested to do in the email you got.
 
Upvote 0
Top