Status Update
Comments
al...@google.com <al...@google.com> #2
Hello, can you please attach a sample that reproduces your error?
du...@google.com <du...@google.com> #3
I’ve attached two screen recordings demonstrating the mediator's behavior during the first and second launches after installation. Additionally,
al...@google.com <al...@google.com> #4
Based on first_launch_after_installation.mp4
, your paging state is indeed showing null
for nextKey, so it makes sense that Paging concluded there are no more items to load.
So I think the question is why the PagingState
contains only an empty page and null
values. My guess is either
- RemoteMediator REFRESH actually returned empty data - what is the returned
allNewsItems
value on initial REFRESH? - RemoteMediator REFRESH successfully loaded data and inserted it into database, but Paging hasn't processed that yet by the time Append is triggered, so PagingState is empty.
The second case doesn't seem likely though.
If you attach an executable app, I can look into this further.
Otherwise, you may gain more insight through Paging logs with adb shell setprop log.tag.Paging VERBOSE
. You can also try implementing RemoteKeys
in this
du...@google.com <du...@google.com> #5
Hey! I ran into this same issue. It is in fact the second case you mentioned and is documented
I've published a repo
al...@google.com <al...@google.com> #6
LIBRARY_GROUP_PREFIX
should cover all of androidx
.
du...@google.com <du...@google.com> #7
It's already set to LIBRARY_GROUP_PREFIX
, and updating baseline doesn't post any changes.
al...@google.com <al...@google.com> #8
fun sameLibraryGroupPrefix(group1: String, group2: String): Boolean {
// TODO: Allow group1.startsWith(group2) || group2.startsWith(group1) ?
if (group1 == group2) {
return true
}
val i1 = group1.lastIndexOf('.')
val i2 = group2.lastIndexOf('.')
if (i2 != i1 || i1 == -1) {
return false
}
return group1.regionMatches(0, group2, 0, i1)
}
Looks like they forgot to make it support groups with more than two levels. The TODO
here would cover our case. Filed
du...@google.com <du...@google.com> #9
Thanks for looking into this!
bu...@google.com <bu...@google.com> #10
Bugjuggler:
Description
The following lint check is baseline suppressed in your project. Please remove all instances of this suppression from
paging/runtime/lint-baseline.xml
and address the associated issues before your next stable release.9 instance(s) of `RestrictedApi
ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/AsyncPagedListDiffer.kt
at line 131:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedList.kt
at line 157:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedList.kt
at line 199:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedList.kt
at line 252:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedList.kt
at line 261:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedList.kt
at line 304:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedList.kt
at line 313:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedListBuilder.kt
at line 51:ArchTaskExecutor can only be called from within the same library group prefix (referenced groupId=
androidx.arch.core
with prefix androidx.arch from groupId=androidx.paging
)Found in
src/main/java/androidx/paging/LivePagedListBuilder.kt
at line 297: