PostHog / PostHog/posthog-android
Support survey cancellation events
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 90
- Forks
- 49
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 61
Description
🚨 IMPORTANT
This issue is likely user-facing in the main PostHog app, see surveyVersionRequirements.ts. If you delete or close this issue, be sure to update the version requirements list here.
Summary
The posthog-android SDK does not support cancellation events for surveys.
Current State
The browser SDK supports cancelEvents in survey conditions, which allows surveys to be dismissed when specific events occur. This is not implemented in posthog-android.
Expected Behavior
When a survey has conditions.cancelEvents.values configured with events, the SDK should:
- Listen for those events being captured
- Dismiss any active survey when a matching cancellation event is triggered
Reference Implementation
See posthog-js browser: packages/browser/src/extensions/surveys.ts
For mobile-specific patterns, see posthog-react-native: packages/react-native/src/surveys/getActiveMatchingSurveys.ts
Tracking
This is tracked in the survey SDK feature parity issue: https://github.com/PostHog/posthog/issues/45658
This issue was generated by Claude using the /survey-sdk-audit skill.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the reference implementation in packages/browser/src/extensions/surveys.ts and the mobile-specific pattern in packages/react-native/src/surveys/getActiveMatchingSurveys.ts. Trace how posthog-android captures events and manages active surveys, then implement matching cancellation behavior and verify that active surveys are dismissed when configured events occur. Check the surveyVersionRequirements.ts reference if the issue is closed or deleted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100