> For the complete documentation index, see [llms.txt](https://docs.nubrick.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nubrick.app/reference/android/phases.md).

# Phases

このページで説明する読み込み状態は、Jetpack Compose の `NubrickSDK.Embedding(...)` と `NubrickSDK.RemoteConfig(...)` で利用します。

Java/XML の `NubrickEmbeddingView` は、読み込み状態を内部で処理します。読み込み状態ごとのビューをカスタマイズする場合は、アプリモジュールで Kotlin/Jetpack Compose を有効にし、埋め込み部分だけを Compose で実装して、`ComposeView` を介して既存の XML レイアウトに組み込んでください。

Java で Remote Config を取得する場合は、`RemoteConfigResult.isSuccess()`、`getValue()`、`getError()` を利用してください。

### EmbeddingLoadingState

`EmbeddingLoadingState` は埋め込み読み込み状態です。

```kotlin
sealed class EmbeddingLoadingState {
    class Loading : EmbeddingLoadingState()
    class Completed(var view: @Composable () -> Unit) : EmbeddingLoadingState()
    class NotFound : EmbeddingLoadingState()
    class Failed(e: Throwable) : EmbeddingLoadingState()
}
```

### RemoteConfigLoadingState

`RemoteConfigLoadingState` は Remote Config 読み込み状態です。

```kotlin
sealed class RemoteConfigLoadingState {
    class Loading : RemoteConfigLoadingState()
    class Completed(var variant: RemoteConfigVariant) : RemoteConfigLoadingState()
    class NotFound : RemoteConfigLoadingState()
    class Failed(e: Throwable) : RemoteConfigLoadingState()
}
```
