> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Android SDK

> Migrate the FlowX Android renderer SDK from 5.1.x LTS to 5.9.x.

## Android SDK migration guide

### SDK API changes

#### Config

The `Config` interface used when initializing the SDK now requires a new, mandatory, property, named `organizationId` (the ID of the organization used to identify your installation):

```kotlin diff 5.1.x LTS..5.9.x version theme={"system"}
Flowx.getInstance().init(
    ...
    config = object : Config {
        override val organizationId: String = "organization id" // [!code ++]
        override val baseUrl = "URL to FlowX backend",
        override val imageBaseUrl = "URL to FlowX CMS Media Library",
        override val enginePath = "some_path",
        override val language = "en",
        override val locale = Locale.getDefault(),
        override val validators: Map<String, (String) -> Boolean>? = mapOf("exact_25_in_length" to { it.length == 25 }),
        override val logEnabled: Boolean get() = 0 != applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE,
    },
    ...
)
```

#### Custom loaders

The `CustomLoaderProvider` interface has been changed from:

```kotlin 5.1.x LTS version theme={"system"}
interface CustomLoaderProvider {
    fun provideCustomLoader(actionName: String?): CustomLoader?
}
```

to

```kotlin 5.9.x version theme={"system"}
interface CustomLoaderProvider {
    fun provideCustomLoader(loaderType: CustomLoaderProvider.LoaderType?): CustomLoader?
}
```

where the `CustomLoaderProvider.LoaderType` is defined like this:

```kotlin theme={"system"}
interface LoaderType {
    interface StartProcess : LoaderType
    interface ReloadProcess : LoaderType
    interface Action : LoaderType { val name: String }
    interface Upload : LoaderType { val name: String }
}
```

<Info>
  The available types for the `loaderType` parameter are:

  * `LoaderType.StartProcess` - received for overriding the loader displayed when starting a new process
  * `LoaderType.ReloadProcess` - received for overriding the loader displayed when resuming an existing process
  * `LoaderType.Action` - received for overriding the loader displayed while the action having the `name` name is executed
  * `LoaderType.Upload` - received for overriding the loader displayed while the **upload** action having the `name` name is executed

  The `name` property received for the `LoaderType.Action` and `LoaderType.Upload` types represents the name of an action, as defined at process definition time, received for being able to override the loader displayed while that action is executed.
</Info>

<Info>
  Returning an implementation of a `CustomLoader` replaces the built-in platform loader with the provided one for the specified use cases.<br /><br />
  Returning `null` keeps the built-in platform loader for the specified use cases.
</Info>

## Related resources

<CardGroup cols={2}>
  <Card title="Android SDK reference" icon="android" href="/5.9/sdks/android-renderer">
    Android renderer SDK documentation
  </Card>

  <Card title="Migration overview" icon="arrow-up-right-from-square" href="./overview">
    Return to the 5.1 LTS → 5.9 LTS migration hub
  </Card>
</CardGroup>
