3


I am using MapBox SDK on my android application, the map onCreate appears perfectly. I can add layers and show my markers and so on.
When the user clicks on a marker another activity is started. So I use mapView.onPause() on my onPause() method.
The issue appears when the user tries to go back to the map activity, I am using finish() method for that and once on the map activity a black screen replaces the map and the user can no more see the map and markers.
I figured out that the issue appears also when I lock the phone and come back to the application.
Any ideas about how to resolve that.

thank you very much.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

5

Forgot to override onStart() method in my activity. I had to add it, and then the problem was solved.

Edit:

Link to the Mapbox LifeCycle Methods.

Added code-snippet for onStart():

    @Override
    public void onStart() {
        super.onStart();
        mapView.onStart();
    }
HauLuk
  • 155
  • 1
  • 11