yfleury Active Member Licensed User Longtime User Aug 2, 2019 #1 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?
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 Aug 2, 2019 #2 yfleury said: I have this in manifest Click to expand... googlemap is using this key. yfleury said: I have to set my api key like that to work Click to expand... if you call the api with okhttputils2 then you need to do that this way, correct. yfleury said: But google don't like that because app that contain exposed Google Cloud Platform (GCP) API key(s) Click to expand... 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
yfleury said: I have this in manifest Click to expand... googlemap is using this key. yfleury said: I have to set my api key like that to work Click to expand... if you call the api with okhttputils2 then you need to do that this way, correct. yfleury said: But google don't like that because app that contain exposed Google Cloud Platform (GCP) API key(s) Click to expand... 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.
Erel B4X founder Staff member Licensed User Longtime User Aug 3, 2019 #3 Also make sure to compile your app in Release (Obfuscated) mode. Upvote 0