Releases: PostHog/posthog-android
android-v3.47.0
Minor Changes
-
8d11398: Add public Logs API:
PostHog.logger.trace/debug/info/warn/error/fatal(message, attrs?)plus aPostHogLogsConfigfor serviceName, environment, resourceAttributes, rate cap, andaddBeforeSendredaction hooks. Logs ship via OTLP/JSON to/i/v1/logsand pick up auto-attached attributes (app.state, distinctId, sessionId, screen name, feature flags). Matches the equivalent surfaces on posthog-ios and posthog-react-native. -
8d11398: Auto-attach
$screen_nameto every captured event afterPostHog.screen()has been called (manually or via Activity-lifecycle auto-capture). Cached value is cleared byreset()andclose().To opt out of
$screen_namestamping entirely, setPostHogAndroidConfig.captureScreenViews = falseand stop callingPostHog.screen()manually. DisablingcaptureScreenViewsalone is not sufficient — a single manualPostHog.screen("Home")call will re-enable stamping.
android-v3.46.0
Minor Changes
- 09f86a6: Add public Logs API:
PostHog.logger.trace/debug/info/warn/error/fatal(message, attrs?)plus aPostHogLogsConfigfor serviceName, environment, resourceAttributes, rate cap, andaddBeforeSendredaction hooks. Logs ship via OTLP/JSON to/i/v1/logsand pick up auto-attached attributes (app.state, distinctId, sessionId, screen name, feature flags). Matches the equivalent surfaces on posthog-ios and posthog-react-native.
android-v3.45.1
Patch Changes
- 3cd4742: Fix session replay screenshots being dropped on screens with continuous animations (e.g. Lottie).
Previously, anyonDrawcallback received while PixelCopy was in flight caused the screenshot to be discarded. IntroducesisOnlyAnimationRedrawto distinguish animation-driven redraws from structural layout changes.
UsesView.hasTransientState()on the decor view, which Android propagates up from any animating descendant, as the signal.
server-v2.5.3
Patch Changes
- b498d90: Reject semver values with leading zeros in local flag evaluation. Per semver 2.0.0 §2, numeric identifiers must not include leading zeros — values like
1.07.3are not valid semver and should not match targeting conditions. Both override values and flag values are now validated; invalid inputs raiseInconclusiveMatchExceptionso the condition does not match.
core-v6.15.0
Minor Changes
-
2282895: Add survey translations support. Surveys can carry per-language overrides for user-visible strings via a
translationsmap keyed by language code. At display time the SDK resolves a language (init override → person property"language"→ device locale), applies any matching translation onto the display model, and stamps the matched key as$survey_languageon every survey event when a translation actually took effect.Configure via
PostHogSurveysConfig.overrideDisplayLanguage. Matching is case-insensitive with a base-language fallback (e.g."pt-BR"falls back to"pt").
android-v3.45.0
Minor Changes
-
2282895: Add survey translations support. Surveys can carry per-language overrides for user-visible strings via a
translationsmap keyed by language code. At display time the SDK resolves a language (init override → person property"language"→ device locale), applies any matching translation onto the display model, and stamps the matched key as$survey_languageon every survey event when a translation actually took effect.Configure via
PostHogSurveysConfig.overrideDisplayLanguage. Matching is case-insensitive with a base-language fallback (e.g."pt-BR"falls back to"pt").
server-v2.5.2
Patch Changes
- 27650da: Refactor
PostHogQueueto be generic onRecordand introduceEndpointSpec
for per-endpoint codec, send, retry policy, and runtime knobs. No behavior
change for events or session replay; sets up future log-record support without
duplicating queue plumbing.
core-v6.14.2
Patch Changes
- 27650da: Refactor
PostHogQueueto be generic onRecordand introduceEndpointSpec
for per-endpoint codec, send, retry policy, and runtime knobs. No behavior
change for events or session replay; sets up future log-record support without
duplicating queue plumbing.
android-v3.44.2
Patch Changes
- 27650da: Refactor
PostHogQueueto be generic onRecordand introduceEndpointSpec
for per-endpoint codec, send, retry policy, and runtime knobs. No behavior
change for events or session replay; sets up future log-record support without
duplicating queue plumbing.
server-v2.5.1
Patch Changes
- e2f9884: Disable SDK setup when the API key is empty or whitespace after trimming.