Migration Guide 3.8
Migration SDK from Old Versions
This section provides a detailed description of API changes introduced or removed in recent SDK upgrades.
We strongly recommend reading this documentation when upgrading the SDK version to understand the differences and update your API calls accordingly.
Migration to Version 3.8.0
Location Permission Validation Enhancement
Version 3.8.0 improves location permission validation during SDK initialization. The SDK now properly checks all location permission states including "denied" and "restricted" cases, not just "not determined".
Behavior Change: - Previously, the SDK only checked the "not determined" case for location permissions - Now, the SDK checks all three cases: "not determined", "denied", and "restricted" - All three cases are treated as "NO PERMISSION" and will prevent successful initialization
Impact: - Apps that previously initialized successfully without proper location permissions may now fail initialization - Ensure location permissions are properly requested and granted before initializing the SDK
Expanded Telematics Events
Version 3.8.0 introduces comprehensive event tracking for better observability and troubleshooting. New event types are automatically sent to Logshed.
New Event Types:
- API_INVOCATION - Tracks all public API calls
- Records API name, parameters, success/failure status
-
Helps identify API usage patterns and issues
-
TRIP_DETECTION_STATUS - Tracks trip detection lifecycle
- Status values: START_PENDING, START_DETECTED, START_FAILED, END_PENDING, END_DETECTED, END_FAILED
-
Provides visibility into trip detection process
-
DM_SDK_LIFE_CYCLE_STATUS - Tracks SDK lifecycle events
- Status values: INITIALIZED, OPTED_IN, STARTED_TRIP_DETECTION, STOPPED_TRIP_DETECTION, OPTED_OUT, SHUTDOWN
-
Monitors SDK state transitions
-
SDK_EXCEPTION - Tracks SDK exceptions
- Records exceptions like geofence addition failures
-
Aids in troubleshooting
-
PERIPHERAL_COLLECTION - Tracks recommended peripherals collection
- Records when peripheral list is collected
- Helps with Bluetooth troubleshooting
No Code Changes Required: - Events are automatically sent to Logshed - No additional configuration needed - Events are sent asynchronously and do not impact SDK performance
Network Reachability Fix:
Version 3.8.0 fixes an issue where offline events were not uploaded when the SDK was first initialized. The SDK now properly checks network reachability status during initialization.
Behavior Change: - Previously, offline events depended solely on NetworkReachability callbacks, which might not fire on first initialization - Now, the SDK actively checks network status during initialization - Offline events will be uploaded immediately if network is available
Impact: - Trip start and end events will be uploaded more reliably - No code changes required - this is an internal fix
Distraction Co-relation with Safety Events
Version 3.8.0 adds support for distraction co-relation with safety events in contextual coaching APIs.
New Feature: - Contextual coaching responses now include distraction events that occurred within a specified time window (e.g., 10 seconds) of safety events (HA/HB) - Supports filtering by: Road Category, Trip Length, Day of Week, Day of Month, and Time of Day
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
1 2 3 4 5 | |
Backward Compatibility
All changes in version 3.8.0 are backward compatible. The new event tracking is automatic and does not require any code changes. Location permission validation is more strict, so ensure permissions are properly granted before initialization.