No description or website provided.
Java
Latest commit 1d3f830 Dec 1, 2016 @justinucd justinucd committed on GitHub Update README.md
Permalink
Failed to load latest commit information.
example Add changelog. Update version to 1.0.1 Nov 17, 2016
gradle/wrapper
launchdarkly-android-client
.gitignore
CHANGELOG.md Add changelog. Update version to 1.0.1 Nov 17, 2016
CONTRIBUTING.md
README.md
build.gradle
circle.yml
gradle.properties
gradlew Steel thread client + example app works Aug 19, 2016
gradlew.bat
settings.gradle Rename android-client module to launchdarkly-android-client Sep 8, 2016

README.md

LaunchDarkly Android SDK

This library is compatible with Android SDK versions 15 and up (4.0.3 Ice Cream Sandwich)

How to use: Check out the included example app, or follow things here:

  1. Declare this dependency:

    compile 'com.launchdarkly:launchdarkly-android-client:1.0.1'
    
  2. In your application configure and initialize the client:

    LDConfig ldConfig = new LDConfig.Builder()
        .setMobileKey("YOUR_MOBILE_KEY")
        .build();
    
    LDUser user = new LDUser.Builder("user key")
       .email("fake@example.com")
       .build();
    
    // NOTE: This method blocks for up to 5 seconds. See Javadoc or http://docs.launchdarkly.com/docs/android-sdk-reference
    // for nonblocking options.
    LDClient ldClient = LDClient.init(this.getApplication(), ldConfig, user, 5);
    
  3. Evaluation example:

    variationResult = ldClient.stringVariation(flagKey, "fallback");
    
  4. Updating the User:

    LDUser updatedUser = new LDUser.Builder(user)
       .email("fake2@example.com")
       .build();
    
    ldClient.identify(user);
    

ProGuard Config

If you're using ProGuard add these lines to your config:

-keep class com.launchdarkly.android.** { *; }
-keep class org.apache.http.** { *; }
-keep class com.google.common.** { *; }
-keep class org.slf4j.** { *; }
-dontwarn org.apache.http.**
-dontwarn org.slf4j.**
-dontwarn java.nio.file.*
-dontwarn javax.annotation.**
-dontwarn sun.misc.Unsafe
-dontwarn java.lang.ClassValue
-dontwarn com.google.j2objc.annotations.Weak
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

Known Issues/Features not yet implemented:

  • Make Android linter happy

Learn more

Check out our documentation for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the complete reference guide for this SDK or our Javadocs.

Testing

Much of the behavior we want to assert is around complicated device state changes such as app backgrounding, loss of internet connection. These are problematic to test in a programmatic way, so we rely on a combination of automated emulator tests and manual tests.

About LaunchDarkly

  • LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
    • Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
    • Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
    • Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
    • Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
  • LaunchDarkly provides feature flag SDKs for
  • Explore LaunchDarkly