- Documentation

After Creating Your Application, it is time to install the SDK.
There are three steps in the SDK install:

  1. Add the Rollout SDK to your project.
  2. Set up your Rollout app key.
  3. Initialize the Rollout SDK when the app starts.

Add the Rollout SDK To Your Project

The first step is to add the ROX Android Java library to the dependencies block in your build.gradle file.

Copy and paste the following line to the app list of dependencies:

implementation 'io.rollout.rox:rox-android:4.6.0'

Set up your Rollout app key

The second step is to add your Rollout app key. This key is unique to your application and can be found in the installation instructions or in the app settings on the ROX dashboard.

The Rollout key needs to be inside the application block in the AndroidManifest.xml file. Don't forget to change the key to the correct one for your application!

  android:value="the app key goes here" />

Set up ProGuard rules

Add this line to proguard configuration file

-keepclasseswithmembernames public class * implements io.rollout.configuration.RoxContainer {
-keepclasseswithmembernames public class io.rollout.** {
-keep class org.json.** { *; }
-keep interface org.json.** { *; }

Initialize the Rollout SDK when the app starts

The third step is to initialize the Rollout SDK when the app starts. If your app contains a class that inherits from the application class, that is the right place to initialize the SDK. If not, you should initialize it in the main activity class of your app.

To initialize the Rollout SDK, add the next line to the onCreate() method of your application class or main activity:


Run the app

Now you can build and run your app in the Android emulator or on a real device.
If you log in to the Rollout dashboard, the dashboard will recognize that the setup is complete.

That's it! Now your app is ready to use Rollout.

And with that, it's time to create a Rollout feature flag.


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.