Skip to content

docs(android): posthog-android 4.0 upgrade guide and replay docs - #21808

Draft
turnipdabeets wants to merge 28 commits into
masterfrom
docs/android-4-upgrade-guide
Draft

turnipdabeets wants to merge 28 commits into
masterfrom
docs/android-4-upgrade-guide

Conversation

@turnipdabeets

@turnipdabeets turnipdabeets commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Important

Hold until posthog-android 4.0 is released.

Depends on:

Changes

Docs for upgrading posthog-android from 3.x to 4.0, plus the pages 4.0 makes wrong.

  • libraries/android/index.mdx: not changed any more. [Waiting on mobile SDK releases] feat(docs): replace the mobile SDK pages with their Markdown references #22334 deletes it and redirects it to the generated SDK reference. The 4.0 upgrade guide is the generated migration page from posthog-android's MIGRATION.md, and the config options are in the 4.x reference, so the upgrade section and config table edits this PR made there were dropped. I checked that every item they covered is in MIGRATION.md or the 4.x reference.
  • feature-flags-code-android.mdx: PostHog.onFeatureFlags() before setup() instead of the removed config option, with a note for 3.x readers. feature-flags/adding-feature-flag-code.mdx imports this snippet too, which is why this PR waits for 4.0.
  • install-android.mdx and the android-* tutorials: posthog-android:4.+.
  • Every PostHogAndroidConfig(apiKey = …): now projectToken, which is a compile error otherwise. Only Android snippets are changed on multi-language pages.
  • tutorials/android-session-replay.md: drops sessionReplayConfig.screenshot = true, removed in 4.0.
  • evaluation-contexts.mdx: notes that the legacy evaluationEnvironments option was removed in 4.0.0, for both Android and iOS. The iOS row is here rather than in docs(ios): posthog-ios 4.0 upgrade guide and screenshot-only mobile replay #21807 because the two rows are adjacent and would conflict, so the PRs merge cleanly in either order.
  • product-analytics/_snippets/multilanguage/opt-out-default.mdx: projectToken, and the token and host placeholders are quoted, so the Android snippet compiles once they're filled in.
  • product-analytics/installation/android.eval.yaml: the install rubric requires projectToken instead of apiKey.
  • session-replay/_snippets/android-privacy.mdx: new "Automatic masking in Jetpack Compose" section for 4.0. It says postHogMask() and postHogUnmask() now apply only to the composable and its children.
  • session-replay/_snippets/android-installation.mdx: deleted. Nothing imports it, and it documented apiKey and wireframe mode.

Not changed:

  • posthog-server: its API is unchanged and the Java page pins no version, so no server page needs an update. 2.25.0 does change behavior (a phx_ key disables the client, empty event names are dropped, $set/$set_once/$groups maps merge key by key, beforeSend gets copies) and needs posthog-android 4.0 in a project that has both. The migration guide's "Upgrade posthog-server" section and the server changeset cover this.
  • libraries/kmp/index.mdx: lists debouncerDelayMs as a posthog-kmp option; that's KMP's own API.

Monorepo onboarding: PostHog/posthog#129665 moves the Android onboarding and push setup snippets to projectToken and posthog-android:4.+, drops screenshot from replay onboarding, and adds the captureAi onboarding tab.

Checklist

  • I've read the docs and/or content style guides.
  • Words are spelled using American English
  • Use relative URLs for internal links
  • I've checked the pages added or changed in the Vercel preview build
  • If I moved a page, I added a redirect in vercel.json (no pages moved)

Vale ran on the changed files. On changed lines it reports only product-name capitalization warnings and terms inside code, in line with the rest of these pages. Not rendered locally, and the snippets aren't compiled.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code (Opus 5.5) at the maintainer's request, checked against the posthog-android 4.0 branch and the open PRs' diffs.

Regrouped by release: the Android replay snippets moved here from #21741, which is closed.

🤖 Generated with Claude Code

@github-actions github-actions Bot added docs Improvements or additions to product documentation, "Docs" content PR only touches files under contents/ labels Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Nov 13, 2026 04:34PM

Changed pages

Page Source
Capture exceptions for error tracking contents/docs/error-tracking/capture.mdx
Bootstrap Feature Flags contents/docs/feature-flags/bootstrapping.mdx
Cutting feature flag costs contents/docs/feature-flags/cutting-costs.mdx
Evaluation contexts contents/docs/feature-flags/evaluation-contexts.mdx
Bootstrapping PostHog SDKs contents/docs/libraries/bootstrapping.mdx
Android Logs installation contents/docs/logs/installation/android.mdx
Android push notifications contents/docs/workflows/push-notifications/android.mdx
How to run A/B tests in Android contents/tutorials/android-ab-tests.md
How to set up analytics in Android contents/tutorials/android-analytics.md
How to set up feature flags in Android contents/tutorials/android-feature-flags.md
How to set up Android remote config contents/tutorials/android-remote-config.md
How to set up Android session replay contents/tutorials/android-session-replay.md

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Vale prose linter → found 0 errors, 98 warnings, 3 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/error-tracking/capture.mdx — 0 errors, 5 warnings, 1 suggestions
Line Severity Message Rule
19:49 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
31:46 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
327:28 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
346:428 warning Capitalize 'Data Warehouse' for PostHog's product. Use 'data warehouse' for the general industry concept. PostHogBase.ProductNames
583:33 warning Capitalize 'Error Tracking' for PostHog's product. Use 'error tracking' for the general industry concept. PostHogBase.ProductNames
599:101 warning 'runtime's' is a possible misspelling. PostHogBase.Spelling
contents/docs/feature-flags/bootstrapping.mdx — 0 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
184:21 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
185:47 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/docs/feature-flags/cutting-costs.mdx — 0 errors, 23 warnings, 0 suggestions
Line Severity Message Rule
21:1 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
21:102 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
23:30 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
26:63 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
37:1 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
61:127 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
65:118 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
67:96 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
69:99 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
69:195 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
69:240 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
69:275 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
75:17 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
75:95 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
75:115 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
92:36 warning 'ETags' is a possible misspelling. PostHogBase.Spelling
92:151 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
104:107 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
256:214 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
256:229 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
256:249 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
272:42 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
272:69 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
contents/docs/feature-flags/evaluation-contexts.mdx — 0 errors, 10 warnings, 0 suggestions
Line Severity Message Rule
13:75 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
28:9 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
42:69 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
43:21 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
44:13 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
44:37 warning Use 'API' instead of 'api'. Vale.Terms
45:17 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
60:64 warning Don't put a comma after 'e.g.,'. Write 'i.e.' or 'e.g.' with no comma after it. PostHogBase.LatinAbbreviationComma
161:237 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
167:16 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/docs/integrate/_snippets/install-android.mdx — 0 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
2:53 warning Avoid trivializing words. 'easily' can sound dismissive to the reader. PostHogDocs.Trivializers
4:1 warning Avoid trivializing words. 'All you need to do' can sound dismissive to the reader. PostHogDocs.Trivializers
contents/docs/integrate/feature-flags-code/_snippets/feature-flags-code-android.mdx — 0 errors, 10 warnings, 0 suggestions
Line Severity Message Rule
1:13 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
15:18 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
29:20 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
31:38 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
43:83 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
45:39 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
78:100 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
80:89 warning Use 'X' instead of 'x'. Vale.Terms
82:15 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
84:91 warning 'refetch' is a possible misspelling. PostHogBase.Spelling
contents/docs/logs/installation/android.mdx — 0 errors, 2 warnings, 0 suggestions
Line Severity Message Rule
2:13 warning Use 'ID' instead of 'id'. Vale.Terms
4:15 warning Use 'Android' instead of 'android'. Vale.Terms
contents/docs/session-replay/_snippets/android-privacy.mdx — 0 errors, 10 warnings, 0 suggestions
Line Severity Message Rule
5:128 warning 'contentDescription' is a possible misspelling. PostHogBase.Spelling
18:179 warning 'contentDescription' is a possible misspelling. PostHogBase.Spelling
29:5 warning 'Masking in Jetpack Compose' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
29:16 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
43:5 warning 'Unmasking in Jetpack Compose' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
43:18 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
56:5 warning 'Automatic masking in Jetpack Compose' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
56:26 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
69:257 warning 'subtree' is a possible misspelling. PostHogBase.Spelling
69:425 warning 'subtree' is a possible misspelling. PostHogBase.Spelling
contents/docs/workflows/push-notifications/android.mdx — 0 errors, 5 warnings, 2 suggestions
Line Severity Message Rule
12:94 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
16:72 warning 'classpath' is a possible misspelling. PostHogBase.Spelling
48:37 warning 'unregisters' is a possible misspelling. PostHogBase.Spelling
48:127 warning Use 'ID' instead of 'id'. Vale.Terms
50:18 warning 'unregistration' is a possible misspelling. PostHogBase.Spelling
110:66 warning 'classpath' is a possible misspelling. PostHogBase.Spelling
111:102 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
contents/tutorials/android-ab-tests.md — 0 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
13:205 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
200:15 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
206:54 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
267:18 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/tutorials/android-analytics.md — 0 errors, 11 warnings, 0 suggestions
Line Severity Message Rule
12:88 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
12:126 warning Use 'Android' instead of 'android'. Vale.Terms
13:87 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
19:2 warning Capitalize 'Product Analytics' for PostHog's product. Use 'Product analytics' for the general industry concept. PostHogBase.ProductNames
58:17 warning 'sharedPreferences' is a possible misspelling. PostHogBase.Spelling
189:28 warning 'xml' is a possible misspelling. PostHogBase.Spelling
208:109 warning Use 'Gradle' instead of 'gradle'. Vale.Terms
225:8 warning Use 'Android' instead of 'android'. Vale.Terms
226:12 warning Use 'PostHog' instead of 'posthog'. Vale.Terms
231:17 warning 'const' is a possible misspelling. PostHogBase.Spelling
233:17 warning 'const' is a possible misspelling. PostHogBase.Spelling
contents/tutorials/android-feature-flags.md — 0 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
2:22 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
16:2 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
175:15 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
186:44 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
contents/tutorials/android-remote-config.md — 0 errors, 3 warnings, 0 suggestions
Line Severity Message Rule
12:127 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
72:15 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
179:4 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
contents/tutorials/android-session-replay.md — 0 errors, 7 warnings, 0 suggestions
Line Severity Message Rule
2:30 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
10:2 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
173:11 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
229:15 warning Use the Oxford comma before 'and' or 'or' in a list of three or more items. PostHogBase.OxfordComma
229:171 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
238:4 warning '3. (Optional) Mask sensitive data' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
266:18 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames

@posthog posthog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review · Standard · reviewed 2559fe8: 2 Should fix.

This is the only automatic review while this pull request is a draft. Comment @posthog review to review new changes sooner. Otherwise, a review of the new changes runs when you mark it ready for review.

See this review and its findings in PostHog Review. Comment @posthog review --deep for a Deep review. A Deep review takes longer and looks deeper than a Standard review.

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Bundle report

Total JS (gzip)

12.08 MiB (+427.4 KiB / +3.6%)

Largest changed named chunks
Chunk Gzip Δ vs master
component---src-templates-ui-library-docs-tsx.js 327.9 KiB new
1fe58427eb479d694d29950a543d39e47969ac6b.js 58.8 KiB new
app.js 1125.7 KiB +37.2 KiB / +3.4%
7875c4c5.js 31.7 KiB new
92e0c1085e591e90091fbb7fb7da7962902ac68a.js 16.3 KiB new
76f86eb630920ff4ca2e0a4385b0719fc1a2dd81.js 9.4 KiB new
component---src-templates-sdk-sdk-markdown-reference-tsx.js 7.9 KiB new
9039878e5ed83c4a38ea8b069f877637312976e8.js 7.0 KiB new
96de664570b44467a6d0591760da6319c7a1ad80.js 126.7 KiB +5.3 KiB / +4.4%
component---src-pages-learn-session-replay-agent-prompts-and-mcp-tsx.js 4.9 KiB +2.4 KiB / +91.7%
component---src-pages-learn-product-analytics-agent-prompts-and-mcp-tsx.js 4.9 KiB +2.3 KiB / +89.4%
component---src-pages-learn-ai-observability-agent-prompts-and-mcp-tsx.js 4.9 KiB +2.3 KiB / +85.4%
component---src-pages-learn-feature-flags-agent-prompts-and-mcp-tsx.js 4.9 KiB +2.3 KiB / +83.7%
dfd0d5c4.js 2.2 KiB new
d53be7e4323c811b7b208da3a1f00becabbdd275.js 456.1 KiB +1.4 KiB / +0.3%

Eager graph (modules shipped in each entrypoint's initial chunks)

Entrypoint Eager size Budget Modules
✅ app 10.41 MiB (+476.2 KiB / +4.7%) report-only 1100
Largest modules in the app closure
Module Size
css ./node_modules/.pnpm/css-loader@5.2.7_webpack@5.101.3/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[1]!./node_modules/.pnpm/postcss-loader@4.3.0_postcss@8.5.6_webpack@5.101.3/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[8].oneOf[1].use[2]!./src/styles/global.css 1022.3 KiB
./src/components/Stickers/Stickers.tsx 696.4 KiB
./node_modules/.pnpm/@posthog+icons@0.36.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js 354.8 KiB
./node_modules/.pnpm/react-markdown@8.0.7_@types+react@16.14.66_react@18.3.1/node_modules/react-markdown/lib/react-markdown.js + 88 modules 351.4 KiB
./node_modules/.pnpm/framer-motion@14.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs + 126 modules 287.2 KiB
./node_modules/.pnpm/cloudinary-core@2.14.0_lodash@4.17.21/node_modules/cloudinary-core/cloudinary-core.js 281.9 KiB
./src/components/SearchUI/index.tsx + 87 modules 273.1 KiB
./gatsby-browser.tsx + 59 modules 258.5 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-1.mjs 248.5 KiB
./src/components/Pricing/PricingSlider/Slider.tsx + 87 modules 240.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/construction-2.mjs 228.2 KiB
./node_modules/.pnpm/@posthog+brand@0.13.0_react@18.3.1/node_modules/@posthog/brand/dist/generated/hoggies/svg/magnifying-glass.mjs 221.7 KiB
./src/hooks/useProducts.tsx + 24 modules 155.6 KiB
./src/hooks/useProduct.ts + 9 modules 149.4 KiB
./src/components/Icons/Icons.tsx 147.4 KiB

Eager-graph budgets are report-only until a baseline is established. Sizes are gzip of public/**/*.js; eager size is webpack module source bytes for the modules actually shipped in the entrypoint's initial chunks (post-tree-shake).

turnipdabeets and others added 2 commits November 4, 2026 16:48
- add $locale and $app_language, Compose replay and masking, super property
  precedence, and dropped or replaced event values to the behavior changes
- add event options and captureAi examples
- note that wrapper SDKs upgrade through their own package and that internal
  helpers are no longer public
- add the compression option and the 5 MiB request cap to the config table,
  and drop the removed drawable conversion
- require projectToken in the Android install eval

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both 4.0 guides edit adjacent rows of the evaluation-contexts table, so
the Android and iOS rows now live in this PR only (iOS 4.0 guide drops
its copy). Both say "removed in 4.0.0", matching the table's versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….0 breaking changes

- add the personal API key and Authorization header breaking changes
- add event options and app language reference sections
- point the upgrade section's captureAi paragraph at the AI events section
- drop maskAllTextInputs = false from the session replay tutorial

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
turnipdabeets added a commit that referenced this pull request Nov 5, 2026
#21808 marks the iOS and Android legacy options as removed in the same
table; editing the row here would conflict with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets turnipdabeets changed the title docs(android): 3.x to 4.0 upgrade guide docs(android): posthog-android 4.0 upgrade guide and replay docs Nov 6, 2026
@turnipdabeets
turnipdabeets requested a review from a team November 6, 2026 18:26
…ay cost

- Add the empty-variant breaking change for getFeatureFlagResult, getAllFeatureFlags, PostHogFeatureFlagsLoaded and $active_feature_flags
- Note that WebViews are masked while maskAllTextInputs or maskAllImages is on, and that screenshots cost more bandwidth and CPU than wireframes
turnipdabeets and others added 6 commits November 9, 2026 09:58
Point the AI events link at the migration guide, cover the missing-flag
$feature_flag_response change, name posthog-server 2.25.0 and its
conflict with posthog-android 3.x, fix the $locale wording, and link to
the session replay privacy page instead of repeating the Compose
masking changes.
/flags still returns enabled: true for a flag with an empty variant, so
other PostHog SDKs can still report it as enabled after this upgrade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… changes

The SDK guide moved to MIGRATION.md. Behavior changes now also cover the
$lib/$lib_version pair, null list elements, no /batch fallback on 404 and
which headers proxies must pass, older proxy recipes stripping
Authorization, and debug logs no longer printing event content.

Claude-Session: https://claude.ai/code/session_019xLynttdFZAHfqTem5BhPQ
# Conflicts:
#	contents/docs/product-analytics/installation/android.eval.yaml
@eli-r-ph

Copy link
Copy Markdown
Contributor

These snippets now use projectToken, which first shipped in 3.72.0, but three pages still give older minimums: workflows/push-notifications/android.mdx:8 (3.58.0), logs/installation/android.mdx:15 (3.46.0) and libraries/android/index.mdx:345 (3.55.0). Could they say 3.72.0, or note that older versions use apiKey?

…erson-profile drop

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ess setting

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets

Copy link
Copy Markdown
Contributor Author

@eli-r-ph Covered by 46ce010: all three pages now say versions before 3.72.0 take apiKey.

… install eval

- Capture v1 now lives at /docs/api/capture-v1, and AI events link the
  section #21385 adds to this page.
- The session replay tutorial keeps maskAllTextInputs = false: it's still
  valid in 4.0, and step 3 relies on text being unmasked.
- The Android privacy page documents web view masking and custom-drawn views.
- Push notifications example uses the <ph_project_token> placeholder.
- The install eval grades posthog-android 4, the major the docs now show.
@eli-r-ph

Copy link
Copy Markdown
Contributor

#22061 lands before this PR. It deletes contents/docs/libraries/android/index.mdx, which this PR edits, and redirects it to /docs/libraries/android/reference. That page shows posthog-android docs/getting-started.md (PostHog/posthog-android#973) as its "Getting started" section, so the new sections here need a home there or in MIGRATION.md (published at /docs/libraries/android/migration). Also:

  • contents/docs/libraries/android/index.mdx:662: #ai-events has no matching heading on the page, so the broken-link check fails → the "AI events" section of /docs/libraries/android/migration

#21385 deletes contents/docs/libraries/android/index.mdx
and redirects it to the generated SDK reference, with the migration guide
generated from posthog-android's MIGRATION.md. That guide and the 4.x
reference cover everything the 4.0 upgrade section and config table here
added, so drop this PR's changes to the page instead of conflicting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@turnipdabeets

Copy link
Copy Markdown
Contributor Author

@eli-r-ph Covered by c0c9bcc: this PR no longer edits libraries/android/index.mdx, and MIGRATION.md covers its 4.0 sections.

The placeholders are replaced with bare values, so the Kotlin didn't compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

content PR only touches files under contents/ docs Improvements or additions to product documentation, "Docs"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants