Lifecycle issues around Recenter, Route overview and Camera functionalities
Noticed some issues around Recenter, Route overview and Camera functionalities.
- The
Recenterbutton and theSummaryBottomSheetdisappear after rotating the screen if you swipe the map and click on the top banner (show the list of instructions). Noting that the camera continues tracking the progress even if you swipe the map 👀

- The
Recenterbutton disappears after hiding the list of instructions if click on the overview button and click on the top banner (show the list of instructions). Noting that after swiping and clicking on theRecenterbutton, it comes back to normal 👀

- The camera continues tracking after clicking on the overview button and rotating the screen 👀

- Recenter functionality disappears after backgrounding and resuming the app. Noting that the camera continues tracking the progress even if you swipe the map 👀

I've reported all of them in the same ticket because I believe all are related - we're not dealing with the lifecycle in those situations properly.
Also, if you rotate after creating a route but before launching navigation, it loses the route
Noticed that in some situations the RECENTER button doesn't hide when instruction view list is showing.

Refs. https://github.com/mapbox/mapbox-navigation-android/issues/714#issuecomment-393977027 - Not completely fixed by https://github.com/mapbox/mapbox-navigation-android/pull/988
Hard to say how I got it though (because I was driving 😬). Will report extra info if seen again.
Will report extra info if seen again.
Found a way of reproducing the issue. If you scroll the map and quickly click on the top banner (while the animation to hide the recenter button is happening) the recenter button appears on top of the instructions list 👀

cc @devotaaabel
While testing the EmbeddedNavigationActivity from the test app noticed that the map gets automatically recentered after clicking on the overview button and then reload the style (clicking on the FAB). Also, the RECENTER button is still shown after that 👀

Another OP-related issue was reported by @siavashabdoli
**Mapbox Navigation SDK version:0.16.0
Steps to trigger behavior
Start navigation Activity in Portrait(Landscape) mode. do not move to avoid new RouteProgress change the orientation to Landscape(Portrait) click on overview button in summary bottom sheet
Expected behavior
show OverView state and change camera
Actual behavior
Camera still remain on marker because RouteProgress is null in NavigationCamera
Another issue related to recenter:
Android API: 25 (Google Nexus 5) & 26 (Samsung A6) Mapbox Navigation SDK version:0.18.0
Steps to trigger behavior
- Use NavigationLauncher.startNavigation
NavigationLauncherOptions options = NavigationLauncherOptions.builder()
.directionsRoute(directionsRoute)
.shouldSimulateRoute(false)
.enableOffRouteDetection(true)
.waynameChipEnabled(true)
.build();
NavigationLauncher.startNavigation(getActivity(), options);
- Press 'Home'-Button
- Go back to App
Expected behavior
Recenter available
Actual behavior
The recenter button is not available

We should revisit which issues are still present at this point.
@abhishek1508 are these still issues in the 1.0 UI SDK?
Definitely some of them, so the question here would be, is this something we want to prioritize?
Let's verify cc @JunDai @cafesilencio @langsmith
This isn't an issue any more per my testing of NavigationViewActivity in 1.0