- HeartbeatService: add NativeAdapter on Android to fix DNS via Java stack;
fix status check from == 200 to >= 200 && < 300
- TelemetryUploader: same two fixes (refactor to _buildDio static method)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause: TelemetryService.initialize() is async (device info collection,
SharedPreferences I/O, remote config sync), taking several hundred ms to
complete. RouteObserver page_view events and auth events fire synchronously
during the initial navigation before initialization finishes, causing the
"TelemetryService not initialized, event ignored" drops seen in logs.
Fix: add _preInitBuffer (max 50 events). logEvent() now enqueues events
instead of dropping when _isInitialized=false. After initialization
completes, all buffered events are replayed in order via logEvent(),
ensuring no startup events are lost.
The network errors ("Failed host lookup: api.gogenex.com") are unrelated —
they are expected in offline test environments and handled gracefully.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add connectivity_plus: ^6.0.3 to pubspec.yaml
- DeviceInfoCollector._getNetworkType() calls Connectivity().checkConnectivity()
and maps ConnectivityResult → wifi / mobile / ethernet / vpn / bluetooth / none / unknown
- networkType field in DeviceContext is now populated on every cold start
- All page_view and session events carry the accurate network type in device props
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>