LaunchDarkly’s mission is to be your complete solution for enterprise feature flag management. We wanted to provide SDKs for every major language and platform, both web and mobile — allowing our customers to manage features and synchronize rollouts across multiple platforms.
Now, we are excited to announce the launch of our Android SDK (beta). This SDK supports both boolean and multivariate feature flags, allowing you to take full control over any feature or configuration in your release.
Additionally, we wanted to ensure that the SDK always served the latest stored flag rules for each user, even if the app was backgrounded or if the app had multiple users on the same device.
To do this, we integrated some neat features: (these features are also available in our iOS SDK)
Android SDK Features
- Simple User Construction
- Easily construct users by using a builder pattern. This makes it easy to use our targeting rules to perform custom rollouts by user key or any attribute.
- Multiple User Contexts on One Device
- If your app is used by multiple users on a single device, you may want to change users and have separate flag settings for each user. To achieve this, the SDK will store the last 5 user contexts on a single device, with support for switching between different user contexts.
- Real-Time Updates
- You can immediately kill bad features and have granular control over the timing of flag updates. LaunchDarkly manages all flags for a user context in real-time by polling flags based on a real-time event stream. When a flag is modified via the LaunchDarkly dashboard, the flag values for the current user will update almost immediately.
- Offline Mode & Background Fetch
- We wanted to make sure that developers had full control over the offline and backgrounded behavior of LaunchDarkly. If a user’s device is in airplane/flight mode or if they are not connected to a network, LaunchDarkly will use the latest stored flag settings in memory. Additionally, when the app is backgrounded, the Android SDK does not receive real-time events. However, a battery-conscious Android Alarm is set to poll for updates once every 5 minutes.
We’re really excited to see what our customers are able to do with the new Android SDK. If you have any questions or feedback, we would love to hear from you at email@example.com.