mapbox / mapbox/mapbox-navigation-android

NavigationView & NavigationLauncher : on progress change issue

Open
#6,972 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

I have some issues with Android Navigation SDK. I'm developing an app that has the purpose to get next maneuvers by on progress change listeners and send to bt device.

If I use NavigationView and NavigationLauncher( for map in real time) , on progress change listener fire correctly but with no update in location and next maneuver .

If I use NavigationView Only ( with no maps visualized ) system works correctly and next step are sent in real time with no issues.

Only one activity with no fragment.

minSdkVersion 21
targetSdkVersion 29
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.42.6';
implementation 'com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v9:0.12.0'

below code where i set options for launchers

boolean NavigationLauncher_r = true; //mappa
boolean NavigationViewLauncher_r = true; //onprogresschange listener
boolean Simulation = true;

    if (directionsRoute == null) {
        return;
    }
 
    if (NavigationLauncher_r) {

    NavigationLauncherOptions options_NL= NavigationLauncherOptions.builder()
            .directionsRoute(directionsRoute)
            .shouldSimulateRoute(Simulation)
            .build();
        NavigationLauncher.startNavigation (MainActivity.this,options_NL);
    }

    if (NavigationViewLauncher_r) {
    NavigationViewOptions options_NW = NavigationViewOptions.builder()
            .directionsRoute(directionsRoute)
            .shouldSimulateRoute(Simulation)
            .navigationListener(MainActivity.this)
            .progressChangeListener(this)
            .build();
    navigationView.startNavigation(options_NW);
    }

}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported behavior from MainActivity using NavigationView, NavigationLauncher, and the on progress change listener with SDK version 0.42.6 and route simulation enabled. Compare listener updates when NavigationLauncher is used with the map versus NavigationView alone. Done means location and next-maneuver updates remain current while the map is displayed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.