Map Fragment does not visually show on screen. However, it is still able to detect marker, place Circles and geofence

Viewed 40

Before we get into the problem. I am making an app that uses geofencing and firebase cloud storage. How it works is that, the latitude and longitude set by the user would be sent to the firebase to store. I have been working on Google maps for a month and so far have not got this problem. Where my map does not appear at all.

Just today, when I tested my application. All of my maps fragment does not visually show as attached below. Strangely enough, I am still able to set my markers, circles, geofences. However, I just could not display the mapview. But I could defintely press the map! Please advice.

What I've tried:

Recreating my gmaps api.

Resetting my SHA-1 key to firebase as Im using gmaps to send latitude/longitude to firebase.

Checked my dependacies.

Checked my location settings, set to high accurancy.

Uninstalled, reinstalled app.

Uninstalled, reinstalled android studio.

Changed emulator.

Downloaded app on my own android device to no avail.

Any advice would be of help! Thank you for your time. :)

My Map Activity

Method for my Map Clicker

    @Override
    public void onMapClick(LatLng latLng) {
        String title = title_et;
            addMarker(latLng, title, 20);
            lat_et.setText(String.valueOf(latLng.latitude));
            lon_et.setText(String.valueOf(latLng.longitude));
        System.out.println("USER CLICK USER CLICK USER CLICK USER CLICK");
        System.out.println("lat = "+(latLng.latitude));
        System.out.println("lon = "+(latLng.longitude));
        System.out.println("USER CLICK USER CLICK USER CLICK USER CLICK");
        }

Log Cat when map on click

2020-07-23 02:26:12.922 16823-16823/com.sp.huehueroject I/System.out: USER CLICK USER CLICK USER CLICK USER CLICK
2020-07-23 02:26:12.922 16823-16823/com.sp.huehueroject I/System.out: lat = 37.31164127402203
2020-07-23 02:26:12.922 16823-16823/com.sp.huehueroject I/System.out: lon = -122.02406119555235
2020-07-23 02:26:12.922 16823-16823/com.sp.huehueroject I/System.out: USER CLICK USER CLICK USER CLICK USER CLICK```

1 Answers

Funny enough, I disabled and enabled my MAPS SDK for android. Then generated a new key. And it worked again. To anyone facing the same problem, do the same above.

Related