diff --git a/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt b/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt index 8220be6bb07..192d901eb93 100644 --- a/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt +++ b/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt @@ -153,7 +153,6 @@ import kotlinx.coroutines.sync.withLock import java.lang.reflect.Field import java.util.Locale -private const val MAPBOX_NAVIGATION_USER_AGENT_BASE = "mapbox-navigation-android" private const val MAPBOX_NAVIGATION_TOKEN_EXCEPTION_ROUTER = "You need to provide an access token in NavigationOptions in order to use the default " + "Router." @@ -546,7 +545,7 @@ class MapboxNavigation @VisibleForTesting internal constructor( MapboxMetricsReporter.init( navigationOptions.applicationContext, token, - obtainUserAgent() + USER_AGENT, ) MapboxMetricsReporter.toggleLogging(navigationOptions.isDebugLoggingEnabled) } @@ -1996,10 +1995,6 @@ class MapboxNavigation @VisibleForTesting internal constructor( rerouteController?.interrupt() } - private fun obtainUserAgent(): String { - return "$MAPBOX_NAVIGATION_USER_AGENT_BASE/${BuildConfig.MAPBOX_NAVIGATION_VERSION_NAME}" - } - private fun monitorNotificationActionButton(channel: ReceiveChannel) { mainJobController.scope.monitorChannelWithException( channel, diff --git a/libnavigation-metrics/src/main/java/com/mapbox/navigation/metrics/MapboxMetricsReporter.kt b/libnavigation-metrics/src/main/java/com/mapbox/navigation/metrics/MapboxMetricsReporter.kt index 00b1aaa7666..6e5dbb857f0 100644 --- a/libnavigation-metrics/src/main/java/com/mapbox/navigation/metrics/MapboxMetricsReporter.kt +++ b/libnavigation-metrics/src/main/java/com/mapbox/navigation/metrics/MapboxMetricsReporter.kt @@ -1,6 +1,7 @@ package com.mapbox.navigation.metrics import android.content.Context +import android.os.Handler import com.google.gson.Gson import com.mapbox.bindgen.Value import com.mapbox.common.Event @@ -66,7 +67,7 @@ object MapboxMetricsReporter : MetricsReporter { * Events priority. See [EventPriority] */ @Volatile - var eventsPriority: EventPriority = EventPriority.QUEUED + var eventsPriority: EventPriority = EventPriority.IMMEDIATE /** * Initialize [EventsServiceInterface] and [TelemetryService] that need to send event to