Skip to main content
The Android SDK exposes live objects and collections through RxJava 3 streams. Singular reads such as getPost(postId) return Flowable<T>. Paged list queries return Flowable<PagingData<T>>. Some finite list queries return Flowable<List<T>>. Use RxJava directly, or convert supported streams to Kotlin Flow with the SDK coroutine bridge.

Platform Surface

Parameters

Observe A Live Object

Observe a live object when your Android UI needs one SDK object to stay current after server or local-store changes.

Observe A Paged Live Collection

The SDK query emits PagingData<AmityPost>. Feed it into your Paging 3 adapter or Compose paging collector.

Convert to Kotlin Flow

Use the coroutine bridge when the rest of your app is built around Kotlin Flow.

Notes

  • A live object fetches the server object and then observes the SDK local store. The internal live-object use case also checks tombstones for hard-deleted objects.
  • Paged live collections use Android Paging 3, so page loading and UI load states should be handled through your Paging adapter or Compose paging integration.
  • Dispose RxJava subscriptions in the matching lifecycle owner or ViewModel. For coroutines, cancel the collecting scope.
  • Use subscribeOn(Schedulers.io()) for SDK work and observeOn(AndroidSchedulers.mainThread()) before mutating UI state.

Post Retrieval

See post-specific Android query examples.

Android Push Notifications

Configure Android notification setup alongside real-time data.