Electric-Coin-Company / zcash-android-wallet-sdk

Native Android SDK for Zcash
MIT License
5 stars 9 forks source link

Incorporate the Paging3 library #242

Closed gmale closed 1 year ago

gmale commented 3 years ago

As a wallet developer, I'd like paging to be easy to use in the SDK so that I can display transactions efficiently in the wallet.

Background:

Criteria:

ccjernigan commented 3 years ago

I spent some time investigating this issue.

I'm not sure how we categorize severity. The current implementation appears to limit the number of transactions that can be queried to 1000 to avoid returning an unbound number of items. If there are more than 1000 transactions, some will not be displayed. So this is broken but it doesn't crash, is consistently reproducible, and is easy to explain as a "known issue." I suspect we can limp along with this issue for a bit longer. Are we aware of end user or SDK customer impacts that might shift this priority higher?

As it comes to prioritizing this issue, some items to consider:

I'd like to consider whether we might be able to have a separate module in the SDK (sort of like -ktx modules in Android X) that adds the Paging extensions. This would avoid putting Paging classes directly in the public API of the core SDK. It shouldn't add much build complexity on our end, as this additional library would live in the same SDK repo and could get published at the same time as the core SDK. The paging libraries have already had API changes in the past (e.g. paging 2 to paging 3), so it would be nice to avoid future dependency hell with clients of our SDK if possible. As a separate library, we could even publish a version for paging 2, paging 3, and some future paging 4 simultaneously.

ccjernigan commented 1 year ago

If we implement paging, it will be done as paging primitives on the public API rather than using the Paging library. We don't want our public API to be tightly coupled with Google.