Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/device-bucketing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
"posthog": minor
"posthog-android": minor
---

feat: add device bucketing support for stable feature flag assignment across identity changes
4 changes: 2 additions & 2 deletions posthog/src/main/java/com/posthog/PostHog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ public class PostHog private constructor(

legacyPreferences(config, config.serializer)

super.enabled = true

// Initialize device_id if not already set. getDeviceId() handles lazy init
// by seeding from the anonymous ID, providing a stable identifier for
// device-level feature flag bucketing that survives identify() and reset().
getDeviceId()

super.enabled = true

queue.start()

startSession()
Expand Down
Loading