Android Surveys installation
🚧 Note: Mobile surveys for Android is currently in beta. We'd love to hear your feedback on betas via the in-app support panel or one of our other support options.
Install with the wizard
Run this command in your project directory to add PostHog to your Android project. The wizard detects your framework, installs the SDK, and sets up your first events.
Or set it up manually by following the rest of this guide.
- 1
Install the dependency
RequiredAdd the PostHog Android SDK to your
build.gradledependencies:build.gradle - 2
Configure PostHog
RequiredInitialize PostHog in your Application class:
SampleApp.kt - 3
Send events
RecommendedOnce installed, PostHog will automatically start capturing events. You can also manually send events to test your integration:
Kotlin - 4
Add the surveys UI module
RequiredAdd the optional
posthog-android-surveys-composemodule alongside the core SDK. It provides a ready-made Jetpack Compose UI.build.gradle - 5
Enable surveys in your configuration
RequiredEnable surveys in your PostHog configuration. The SDK auto-discovers the UI module from the classpath, so matching surveys render automatically with no extra wiring.
SampleApp.kt - 6
Next steps
RecommendedAfter installing the PostHog SDK, you can create your first survey.
Resource Description Creating surveys Learn how to build and customize your surveys Targeting surveys Show surveys to specific users based on properties, events, or feature flags How to create custom surveys Build advanced survey experiences with custom code Framework guides Setup guides for React, Next.js, Vue, and other frameworks More tutorials Other real-world examples and use cases You should also identify users and capture events with PostHog to control who and when to show surveys to your users.
Not all survey features are available on every SDK. See the SDK feature support matrix for a full comparison.
Supported features
Not all survey features are available on every SDK. See the SDK feature support matrix for a full comparison.
Limitations
- HTML descriptions for questions and the thank-you screen render as plain text.
Troubleshooting
- Update your SDK and run a clean build if you experience issues.
- If surveys aren't shown, make sure
surveys = trueis set in your config and the survey is enabled in your project settings.





