On this page

Android SDK configuration

The following configuration will require workspace key. You can get your workspace key in the Access Keys section of the Survicate panel.

  1. Configure your workspace key in AndroidManifest.xml file. Create meta-data: com.survicate.surveys.workspaceKey.

As an alternative to the main way of specifying the Workspace Key, you can also use the setWorkspaceKey() method.

Important:

  • Using setWorkspaceKey() method overrides the Workspace Key defined in the configuration.
  • setWorkspaceKey() method must be used before init() method is called.
  1. Initialize the SDK in your application class using init() method. If your project doesn't have a custom application class yet, you'll need to create one. Make sure that your custom application class is defined in AndroidManifest.xml.

Enable debug messaging

To enable debug logcat messages from the SDK, pass true as the second parameter to the init() method:

This is useful for development and debugging purposes. Make sure to disable it in production builds.

ProGuard / R8

The SDK provides built-in proguard rules, so you don't have to specify them manually.

Included rules

The proguard rules listed above were applicable only up to SDK version 6.4.3. Starting from version 7.0.0, the Survicate Android SDK no longer uses any custom proguard rules. However, the SDK depends on Coil and Kotlinx Serialization libraries, which apply some rules by default.