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.