mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

Lifecycle issues around Recenter, Route overview and Camera functionalities

Open Guardiola31337 opened this issue 8 years ago • 10 comments

Noticed some issues around Recenter, Route overview and Camera functionalities.

  • The Recenter button and the SummaryBottomSheet disappear 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 👀

recenter_summarybottomsheet_disappear_after_instructions_list_plus_rotation

  • The Recenter button 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 the Recenter button, it comes back to normal 👀

recenter_disappears_after_instructions_list_plus_overview

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

camera_continues_tracking_after_overviewed_plus_screen_rotation

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

recenter_functionality_disappears_after_backgrounding_resuming_app

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.

Guardiola31337 avatar Jul 02 '18 14:07 Guardiola31337

Also, if you rotate after creating a route but before launching navigation, it loses the route

devotaaabel avatar Jul 02 '18 20:07 devotaaabel

Noticed that in some situations the RECENTER button doesn't hide when instruction view list is showing.

recenter_button_does_not_hide_instruction_list

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.

Guardiola31337 avatar Jul 06 '18 10:07 Guardiola31337

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 👀

recenter_on_top_of_instructions_list

cc @devotaaabel

Guardiola31337 avatar Jul 12 '18 16:07 Guardiola31337

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 👀

recentered_after_reloading_style

Guardiola31337 avatar Jul 20 '18 13:07 Guardiola31337

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

Guardiola31337 avatar Aug 20 '18 08:08 Guardiola31337

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

  1. Use NavigationLauncher.startNavigation
NavigationLauncherOptions options = NavigationLauncherOptions.builder()
        .directionsRoute(directionsRoute)
        .shouldSimulateRoute(false)
        .enableOffRouteDetection(true)
        .waynameChipEnabled(true)
        .build();

NavigationLauncher.startNavigation(getActivity(), options);
  1. Press 'Home'-Button
  2. Go back to App

Expected behavior

Recenter available

Actual behavior

The recenter button is not available

ezgif com-video-to-gif-2

P-Zenker avatar Sep 07 '18 09:09 P-Zenker

We should revisit which issues are still present at this point.

Guardiola31337 avatar Jun 20 '19 21:06 Guardiola31337

@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?

Guardiola31337 avatar Jun 01 '20 18:06 Guardiola31337

Let's verify cc @JunDai @cafesilencio @langsmith

abhishek1508 avatar Jul 14 '20 19:07 abhishek1508

This isn't an issue any more per my testing of NavigationViewActivity in 1.0

JunDai avatar Aug 12 '20 05:08 JunDai