Class ApplicationInfoBuilder

java.lang.Object
com.launchdarkly.sdk.android.integrations.ApplicationInfoBuilder

public final class ApplicationInfoBuilder extends Object
Contains methods for configuring the SDK's application metadata.

Application metadata may be used in LaunchDarkly analytics or other product features, but does not affect feature flag evaluations.

If you want to set non-default values for any of these fields, create a builder with Components.applicationInfo(), change its properties with the methods of this class, and pass it to LDConfig.Builder.applicationInfo(ApplicationInfoBuilder):


     LDConfig config = new LDConfig.Builder()
         .applicationInfo(
             Components.applicationInfo()
                 .applicationId("authentication-service")
                 .applicationVersion("1.0.0")
         )
         .build();
 
Since:
4.1.0
  • Constructor Details

  • Method Details

    • applicationId

      public ApplicationInfoBuilder applicationId(String applicationId)
      Sets a unique identifier representing the application where the LaunchDarkly SDK is running.

      This can be specified as any string value as long as it only uses the following characters: ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.

      Parameters:
      applicationId - the application identifier
      Returns:
      the builder
    • applicationName

      public ApplicationInfoBuilder applicationName(String applicationName)
      Sets a human friendly name for the application in which the LaunchDarkly SDK is running.

      This can be specified as any string value as long as it only uses the following characters: ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.

      Parameters:
      applicationName - the human friendly name
      Returns:
      the builder
    • applicationVersion

      public ApplicationInfoBuilder applicationVersion(String version)
      Sets a unique identifier representing the version of the application where the LaunchDarkly SDK is running.

      This can be specified as any string value as long as it only uses the following characters: ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.

      Parameters:
      version - the application version
      Returns:
      the builder
    • applicationVersionName

      public ApplicationInfoBuilder applicationVersionName(String versionName)
      Sets a human friendly name for the version of the application in which the LaunchDarkly SDK is running.

      This can be specified as any string value as long as it only uses the following characters: ASCII letters, ASCII digits, period, hyphen, underscore. A string containing any other characters will be ignored.

      Parameters:
      versionName - the human friendly version name
      Returns:
      the builder
    • createApplicationInfo

      public ApplicationInfo createApplicationInfo()
      Called internally by the SDK to create the configuration object.
      Returns:
      the configuration object