I have not been able to see Google maps in production mode, there are other questions that refer to this case, I have followed each of the indications and tips but I can only see google maps in the emulator but not when it is downloaded or updated from play store, to solve it I am using an app that I have uploaded so I will share all the information of keys sha-1, code, images of the keys of APIs, if I manage to solve it here I will also achieve it in the original app and it is that the same thing happens with three projects that I have.
In many questions with this same problem, the solution is to obtain the fingerprint of the keystore with which the app is being uploaded to playstore and set in the key for the google maps API, I have done this but I still without being able to visualize the maps, then all the process that I have done.
activity_maps.xml
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="google.maps.tintal.MapsActivity" />
MapsActivity.java
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
//Parroquie San Agustín
LatLng unia01 = new LatLng(4.653980, -74.146397);
mMap.addMarker(new MarkerOptions().position(unia01).title("Parroquia San Agustín").snippet("Diosesis de fontibon").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE)));
//Uniagustiniana
LatLng unia02 = new LatLng(4.653421, -74.145150);
mMap.addMarker(new MarkerOptions().position(unia02).title("Uniagustiniana").snippet("Universitaria Agustiniana").icon(BitmapDescriptorFactory.fromResource(R.drawable.marker)));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(unia01,17));
}
AndroidManifest.xml
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.NoActionBar">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyDjd5MPotj1x8v96Hs05dIRTjdocektzWg" />
<activity
android:name=".MapsActivity"
android:label="@string/title_activity_maps" />
</application>
In AndroidManifest, the API_KEY key is referenced, which is enabled with the Google Maps Android API Library of GoogleAPIs, where it is enabled for both the test keystore in order to visualize the maps in the emulator, where it shows without problem; and also for the production keystore in order to visualize the maps in the app downloaded or updated playstore.
Fingerprint of the production keystore.
In addition, I enabled Google PlayStore Application Signature.
It is related to the key in GoogleAPIs:
The Library enabled is Google Maps Android API
Having all this, I still can not see the maps in production mode but in the emulator ( sha-1 test : A2: 1C: 33: 62: F3: 88: C2: 62 : C4: C5: C0: ED: BB: B9: D5: B7: 53: 4E: F7: 3D), in LogCat for debug the following is shown and the map is displayed:
I have installed the NOX application, where I download and install the app from playstore and in Logcat it shows me the following and the map is not shown:
Please, I appreciate your help, after finishing with the map I still have push notifications in production.