Skip to content

Commit

Permalink
fix: move identifyInterceptor before eventBridge receiver is set (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori authored Feb 24, 2024
1 parent 4e37e0f commit a6d4c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/amplitude/api/AmplitudeClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a6d4c9d

Please sign in to comment.