-
Notifications
You must be signed in to change notification settings - Fork 319
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
Conversation
} | ||
|
||
public MapboxNavigation(@NonNull Context context, @NonNull String accessToken, | ||
@NonNull MapboxNavigationOptions options, boolean isFromNavigationUi) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 👀
Line 148 in 1867c75
String userAgent = String.format("%s/%s", sdkIdentifier, BuildConfig.MAPBOX_NAVIGATION_VERSION_NAME); |
…g on where they come from (navigation or navigation-ui)
02425f5
to
1867c75
Compare
@Guardiola31337 Looks good to me, I like the use of |
* 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)
* 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
sdkIdentifier
depending on where they come from (mapbox-navigation-android
ormapbox-navigation-ui-android
)2.2.5
👀 @zugaldia @cammace @danesfeder @electrostat