Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix navigation events #277

Merged
merged 1 commit into from
Sep 28, 2017
Merged

Fix navigation events #277

merged 1 commit into from
Sep 28, 2017

Conversation

Guardiola31337
Copy link
Contributor

  • Fixes navigation events so that use the correct sdkIdentifier depending on where they come from (mapbox-navigation-android or mapbox-navigation-ui-android)
  • Bumps MAS version to 2.2.5

👀 @zugaldia @cammace @danesfeder @electrostat

}

public MapboxNavigation(@NonNull Context context, @NonNull String accessToken,
@NonNull MapboxNavigationOptions options, boolean isFromNavigationUi) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cammace Do you think it would be cleaner to add a boolean isFromNavigationUi to MapboxNavigationOptions rather than adding a parameter to the constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danesfeder 1867c75 addresses your comment.

String userAgent = String.format("%s/%s", sdkIdentifier, BuildConfig.MAPBOX_NAVIGATION_VERSION_NAME);
MapboxTelemetry.getInstance().initialize(context, accessToken, userAgent, sdkIdentifier,
BuildConfig.MAPBOX_NAVIGATION_VERSION_NAME);
MapboxTelemetry.getInstance().newUserAgent(userAgent);
Copy link
Contributor

@danesfeder danesfeder Sep 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Guardiola31337 Should we take care of setting the user agent for the UI here as well (now that we know if we are initializing from the UI or not)? Rather than when I initialize in NavigationView https://github.com/mapbox/mapbox-navigation-android/blob/master/navigation/libandroid-navigation-ui/src/main/java/com/mapbox/services/android/navigation/ui/v5/NavigationView.java#L428

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danesfeder we're already doing it 👀

String userAgent = String.format("%s/%s", sdkIdentifier, BuildConfig.MAPBOX_NAVIGATION_VERSION_NAME);

…g on where they come from (navigation or navigation-ui)
@danesfeder
Copy link
Contributor

@Guardiola31337 Looks good to me, I like the use of MapboxNavigationOptions a lot more. @cammace any other thoughts on this?

@Guardiola31337 Guardiola31337 merged commit 39a040f into master Sep 28, 2017
@Guardiola31337 Guardiola31337 deleted the pg-fix-turnstile-events branch September 28, 2017 17:22
Grsmto pushed a commit to Grsmto/mapbox-navigation-android that referenced this pull request Oct 2, 2017
* master:
  Resolves several code issues (mapbox#287)
  removed OSRM-Text-Instructions (mapbox#288)
  readme bump to 0.6.1 (mapbox#282)
  0.6.1 Release (mapbox#283)
  fix navigation events so that use the correct sdk identifier depending on where they come from (navigation or navigation-ui) (mapbox#277)
Grsmto pushed a commit to Grsmto/mapbox-navigation-android that referenced this pull request Oct 3, 2017
* grs-fix-offroute-false-positive: (50 commits)
  add missing imports
  offroute detector should get the right upComingStep instead of the last step of the leg to do the calculation
  Resolves several code issues (mapbox#287)
  removed OSRM-Text-Instructions (mapbox#288)
  readme bump to 0.6.1 (mapbox#282)
  0.6.1 Release (mapbox#283)
  fix navigation events so that use the correct sdk identifier depending on where they come from (navigation or navigation-ui) (mapbox#277)
  fix a bug where the snappedPoint lat/lng values are infinity if the step geometry is a single point (for example the last step of a leg) instead of a line string
  we don't need to enter in this condition if isOffRoute is false
  fix mockNavigation activity waypoints adding order + zoom level for easier testing
  add offroute event listener on mockLocation activity, so we can test this
  bumped version # in readme (mapbox#267)
  Release 0.6 (mapbox#262)
  Don't remove milestone listener on arrival / adjust arrival verbiage
  Update Camera tilt and MAS dependency (mapbox#261)
  unknown profile (mapbox#259)
  Bump up Navigation UI example / change log position (mapbox#260)
  Reduce Reroute Threshold (mapbox#251)
  Camera and location layer ignore null location (mapbox#252)
  User agent plus exit roundabout (mapbox#250)
  ...

# Conflicts:
#	navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/DefaultMilestones.java
#	navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/navigation/NavigationHelper.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants