objectbox / objectbox/objectbox-java

Support android Pagination for paging3

Open
#1,191 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
4.6k
Forks
311
PR merge metrics
No merged PRs in 30d

Description

Is there an existing issue?
Use case

Using ObjectBox as the database for Android Apps i would like to use the pagination library paging3 from android.
See https://developer.android.com/topic/libraries/architecture/paging/v3-overview

Since ObjectBox 2.0.0 there is an implementation of LiveData<PagedList< DATAENTITYMODEL >>,
which was a very good integration with androids paging2 library back then.

Can you create a similar solution for use with the Android paging3 library?
https://developer.android.com/topic/libraries/architecture/paging/v3-overview#kts

Proposed solution

I would love to see an implementation of
Flow<PagingData< DATAENTITYMODEL >>
such that i can do, what is described here
https://developer.android.com/topic/libraries/architecture/paging/v3-paged-data#display-paged-data

Alternatives

Alternative: An implementation of PagingSource could also help to use the android paging3 library
https://developer.android.com/reference/kotlin/androidx/paging/PagingSource

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by locating the existing LiveData<PagedList<...>> integration in objectbox-java and compare its entry point with Android Paging 3's PagingSource and Flow<PagingData<...>> documentation. Done means a supported Paging 3 integration that enables the proposed paged-data usage or the PagingSource alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
database, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.