Skip to content

Setapp

Setapp is a comprehensive solution that allows Android app developers to modify their app configuration at runtime, through integration of two parts - the application and the SDK. The SDK is a third-party library that can be integrated into an app, which enables runtime configuration changes. These changes can include modifying various parameters such as API URLs or enabling/disabling certain features like ads or onboarding.

With Setapp, you can accelerate your testing and development processes by making it easier to modify runtime configuration parameters without having to release a new version of your app. The Setapp app provides an intuitive interface for modifying these values in real time, which means that non-technical users can also experiment with the app's behavior.

To use Setapp, you simply need to integrate the Setapp library and define the parameters that you want to allow for runtime configuration changes. After that, you can use the Setapp app to modify the values of those parameters and immediately see the changes take effect.

Library

To integrate Setapp into your Android app, you need to add the necessary dependencies to your app's build.gradle file. Setapp is distributed through MavenCentral, so you'll need to add the following to your project's root build.gradle file to use it:

repositories {
    mavenCentral()
}

Then, in your project's build.gradle file, add the following dependencies:

dependencies {
    def setapp_version = '1.1.1'

    debugImplementation "io.setapp:setapp:${setapp_version}"
    releaseImplementation "io.setapp:setapp-noop:${setapp_version}"
}

Please note that the io.setapp:setapp-noop package provides empty implementations.

Once you've integrated Setapp into your app, you can use it to get runtime configuration values by calling one of the following methods:

Get an integer value:

val value: Int = Settings.getInt("YOUR_KEY_HERE", -1)
val value: Int? = Settings.getIntOrNull("YOUR_KEY_HERE")

Get a long value:

val value: Long = Settings.getLong("YOUR_KEY_HERE", -1L)
val value: Long? = Settings.getLongOrNull("YOUR_KEY_HERE")

Get a float value:

val value: Float = Settings.getFloat("YOUR_KEY_HERE", -1F)
val value: Float? = Settings.getFloatOrNull("YOUR_KEY_HERE")

Get a string value:

val value: String = Settings.getString("YOUR_KEY_HERE", "")
val value: String? = Settings.getStringOrNull("YOUR_KEY_HERE")

Get a boolean value:

val value: Boolean = Settings.getBoolean("YOUR_KEY_HERE", false)
val value: Boolean? = Settings.getBooleanOrNull("YOUR_KEY_HERE")

Simply replace YOUR_KEY_HERE with the key for the configuration value you want to get. If the key does not exist, the methods with a OrNull suffix will return null instead of a default value.

Application

Setapp Android application that allows you to modify runtime configuration values in real-time for your Android app development projects. It is available for download on the Google Play Store. After downloading you need to add your package name and configuration you definde in your application. It is an foreground service based application. you need to start foregrouind service for changing configuration in the your application.

Adding the configuration

  • tap on plus button
  • type your package name
  • tape on checkmark mark
  • navigate to the package
  • tap on pluse button
  • type key, value and choose the type

Enable the foreground service

The Setapp application is a foreground service-based application, which means you need to start the service to modify configuration in your application. There are two ways to enable it:

  1. From the Setapp application's main screen, tap on the play button. This will start the foreground service and allow you to modify configuration values in real-time.
  2. Use the Android quick settings to enable the Setapp tile. To do this, pull down the status bar and click on the edit button. Then, add the Setapp tile to the quick settings menu. Once the tile is added, you can easily toggle the foreground service by tapping on the Setapp tile.

With the Setapp foreground service enabled, you can now modify your app's configuration values in real-time and see the changes take effect immediately. This makes it easier to test and iterate on your app's features and functionality during development.