-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
LiveData problem
Currently, the methods return results wrapped in LiveData. This is an Rx‑style approach that was popular on Android around 2020. Today it isn’t as widely used because Kotlin’s Flow and suspending coroutines have become the preferred way to handle asynchronous data streams.
I propose switching back to plain callbacks, which can then be converted into Flow or coroutine‑based APIs if needed. The current pattern for obtaining a result is cumbersome:
MainActivity.OPTABLE
.targeting()
.observe(viewLifecycleOwner) { result ->
if (result.status == OptableSDK.Status.SUCCESS) {
// …
}
}
By using simple callbacks, the code becomes more straightforward and can be easily wrapped into modern reactive constructs when required.
Metadata
Metadata
Assignees
Labels
No labels