To first create credentials to access your enabled APIs, see the details in the API documentation . Secondly, I'll give you some tips below:
Create API Key
Step 1: Fingerprint for certification SHA-1
To get the fingerprint for SHA-1 certification, you have to log in to the console of your computer and carry out the following command:
keytool -list -v -keystore c
: \ Users \ MyNameUser \ .android \ debug.keystore -alias androiddebugkey -storepass android -keypass android
FORMAT: 5D:C1:0B:2E:E2:91:C3:BB:3E:60:6A:8A:3E:8D:56:C1:0A:C6:36:B2
Step 2: Create your API key
To create your API key, visit the Console APIs at link and sign in with your Google account.
FORMAT: AIzaSyAi6j8jukil9XnoWzeAsB1Fgr1CQkq9Yk8
Look at the image below as it should be configured correctly.
Image:
CreateOAuth2.0ClientIDs
YouhavetogenerateaAuthorizationcertificatefingerprint
AddyourpackagenameandfingerprintoftheloginSHA-1
certificatetorestrictusagetoyourAndroidapplications. See here .
Note below how it should be configured:
Image:
Despiteallsetup,it'simportanttodownloadthe%% provided by Google Console and save in of the APP folder in your project.
No Manifest.xml
In your application, you should enter your google-services.json
's as follows:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
PS: No forget to grant permission to access internet meta-data