Maps Android Studio is not displayed when the app is downloaded from play store

1

I'm having a problem showing google maps in my app, before the map was shown correctly, the marker with the requested approach, when I emulate my project in the emulator or I do it on my cell phone through cable, the map will be shows correctly, but now that I uploaded my app to play store, the map is not shown on the devices that download it from there.

I have configured the credential in GoogleApi for several months, now I have generated a new key and added it to the project but it still does not show me the map.

When I applied for the first key in GooleAPIs my project had a different package name than the one I now have and I am not sure if this is the reason, I searched in GoogleAPIs the project settings to change the project name but I did not encounter, I would also like to know if creating a new project in GoogleAPIs this could be arranged.

Next I show you the java file, the xml and some screenshots of GoogleAPIs, I appreciate your help.

JAVA

public class Fragment_Rutas extends Fragment implements OnMapReadyCallback {

public Fragment_Rutas() {
    // Required empty public constructor
}

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_rutas, container, false);

    SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);

    return v;
    //AIzaSyBfIvrguKAhUaW8CA0dvgyEXEFADleNCtc
}

@Override//acercamiento
public void onMapReady(GoogleMap googleMap) {

    LatLng bogota = new LatLng(4.653421, -74.145150);
    googleMap.addMarker(new MarkerOptions().position(bogota)
            .title("Uniagustiniana"));
    googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(bogota, 16.1f));
}
}

XML

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="300dp"
    android:background="#94dea7">

    <fragment
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.SupportMapFragment" />

</LinearLayout>

Image of the activity

Image GoogleAPIs, credentials.

    
asked by Ivan Alfredo 01.02.2018 в 18:21
source

1 answer

3
  

When I emulate my project in the emulator or I do it on my cellphone   Through cable, the map is displayed correctly

Remember that the Keystore you use for debug is not the same one used to sign an application for production.

Get the SHA-1 from the Keystore with which you signed your application for the Playstore and enable the API in the console for your application package, this should work.

The Key API for debug is not the same as the one defined for an application intended for the Play Store.

    
answered by 01.02.2018 / 18:32
source