Android feature flags installation
The best way to install the PostHog Android library is with a build system like Gradle. This ensures you can easily upgrade to the latest versions.
All you need to do is add the posthog-android module to your App's build.gradle or build.gradle.kts:
app/build.gradle
Configuration
The best place to initialize the client is in your Application subclass.
Kotlin
Next steps
| Resource | Description |
|---|---|
| Adding feature flag code | How to check flags in your code for all platforms |
| Framework-specific guides | Setup guides for React Native, Next.js, Flutter, and other frameworks |
| How to do a phased rollout | Gradually roll out features to minimize risk |
| More tutorials | Other real-world examples and use cases |