From a6d4c9d1ad8cfc99420e92ed39164feaf3e5eac1 Mon Sep 17 00:00:00 2001 From: Brian Giori Date: Fri, 23 Feb 2024 16:52:21 -0800 Subject: [PATCH] fix: move identifyInterceptor before eventBridge receiver is set (#392) --- src/main/java/com/amplitude/api/AmplitudeClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amplitude/api/AmplitudeClient.java b/src/main/java/com/amplitude/api/AmplitudeClient.java index 8175c333..c90b53e3 100644 --- a/src/main/java/com/amplitude/api/AmplitudeClient.java +++ b/src/main/java/com/amplitude/api/AmplitudeClient.java @@ -392,6 +392,8 @@ public void onFinished() { client.userId = dbHelper.getValue(USER_ID_KEY); } + identifyInterceptor = new IdentifyInterceptor(dbHelper, logThread, identifyBatchIntervalMillis, this); + // set up listener to core package to receive exposure events from Experiment connector.getEventBridge().setEventReceiver(analyticsEvent -> { String eventType = analyticsEvent.getEventType(); @@ -435,8 +437,6 @@ public void onDatabaseReset(SQLiteDatabase db) { } }); - identifyInterceptor = new IdentifyInterceptor(dbHelper, logThread, identifyBatchIntervalMillis, this); - initialized = true; } catch (CursorWindowAllocationException e) { // treat as uninitialized SDK