Skip to content

Introduce new user agent API#568

Merged
Guardiola31337 merged 1 commit intomasterfrom
pg-new-user-agent-api
Sep 19, 2017
Merged

Introduce new user agent API#568
Guardiola31337 merged 1 commit intomasterfrom
pg-new-user-agent-api

Conversation

@Guardiola31337
Copy link
Contributor

  • Adds newUserAgent(String userAgent)

👀 @cammace @ericrwolfe @zugaldia

Copy link

@ericrwolfe ericrwolfe left a comment

Choose a reason for hiding this comment

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

Just checking, this uses the version string of the userAgent that's passed into newUserAgent(), rather than the version of the telemetry library, right?

@danesfeder
Copy link
Contributor

@ericrwolfe @Guardiola31337 When I create a new instance MapboxNavigation, it will initialize the telem library.

Will it be initialized with userAgent set to "mapbox-navigation-android"?

If someone launches the drop-in UI, it should be be changed to "mapbox-navigation-android-ui", so I will need to add a line in the UI code after I initialize MapboxNavigation to set it to "mapbox-navigation-android-ui" right?

@ericrwolfe
Copy link

If someone launches the drop-in UI, it should be be changed to "mapbox-navigation-android-ui", so I will need to add a line in the UI code after I initialize MapboxNavigation to set it to "mapbox-navigation-android-ui" right?

Yep that's correct. Here's where it's done on iOS:

Per my comment above #568 (review), you'll probably need to pass a full user agent string with a version, such as mapbox-navigation-ui-android/0.6.0-SNAPSHOT, into newUserAgent().

@danesfeder
Copy link
Contributor

Okay sounds good - adding to list of things to do in the Nav SDK once MAS lands

@Guardiola31337
Copy link
Contributor Author

you'll probably need to pass a full user agent string with a version, such as mapbox-navigation-ui-android/0.6.0-SNAPSHOT, into newUserAgent().

That's correct.

After initializing telemetry you should add a call to MapboxTelemetry.getInstance().newUserAgent("<fullUserAgent>");

Merging it.

@Guardiola31337 Guardiola31337 merged commit d089d50 into master Sep 19, 2017
@Guardiola31337 Guardiola31337 deleted the pg-new-user-agent-api branch September 19, 2017 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants