diff --git a/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/MapboxTelemetry.java b/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/MapboxTelemetry.java index 193cab370..62a84270b 100644 --- a/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/MapboxTelemetry.java +++ b/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/MapboxTelemetry.java @@ -795,4 +795,12 @@ private Object addSdkVersion() { return sdkVersion; } + + // For internal use only + // This is an experimental API. Experimental APIs are quickly evolving and + // might change or be removed in minor versions. + @Experimental + public void addLocationEngineName(@NonNull String locationEngineName, Hashtable eventWithAttributes) { + eventWithAttributes.put(MapboxNavigationEvent.KEY_LOCATION_ENGINE, locationEngineName); + } } diff --git a/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/http/TelemetryClient.java b/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/http/TelemetryClient.java index 728dafd05..340ef0dad 100644 --- a/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/http/TelemetryClient.java +++ b/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/http/TelemetryClient.java @@ -210,6 +210,7 @@ private void sendEventsWrapped(Vector> events, Callbac evt.get(MapboxNavigationEvent.KEY_ARRIVAL_TIMESTAMP)); jsonObject.putOpt(MapboxNavigationEvent.KEY_STEP, evt.get(MapboxNavigationEvent.KEY_STEP)); jsonObject.putOpt(MapboxNavigationEvent.KEY_STEP_COUNT, evt.get(MapboxNavigationEvent.KEY_STEP_COUNT)); + jsonObject.putOpt(MapboxNavigationEvent.KEY_LOCATION_ENGINE, evt.get(MapboxNavigationEvent.KEY_LOCATION_ENGINE)); // Step metadata jsonObject.putOpt(MapboxNavigationEvent.KEY_UPCOMING_INSTRUCTION, diff --git a/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/navigation/MapboxNavigationEvent.java b/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/navigation/MapboxNavigationEvent.java index eaa6367ec..7bfd68c5e 100644 --- a/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/navigation/MapboxNavigationEvent.java +++ b/mapbox/libandroid-telemetry/src/main/java/com/mapbox/services/android/telemetry/navigation/MapboxNavigationEvent.java @@ -72,6 +72,7 @@ public class MapboxNavigationEvent { public static final String KEY_ARRIVAL_TIMESTAMP = "arrivalTimestamp"; public static final String KEY_STEP = "step"; public static final String KEY_STEP_COUNT = "stepCount"; + public static final String KEY_LOCATION_ENGINE = "locationEngine"; // Step metadata public static final String KEY_UPCOMING_INSTRUCTION = "upcomingInstruction";