Skip to content

RxRemoteMediator triggers an error #97

@argonath88

Description

@argonath88

I tried implementing this using the RxRemoteMediator since I'm more familiar with RxJava than with coroutines. However when trying to use it I got this error

ItemDao.java:32: error: Not sure how to convert a Cursor to this method's return type (androidx.paging.PagingSource<java.lang.Integer,com.example.android.MyClass>).
    public abstract androidx.paging.PagingSource<java.lang.Integer, com.example.android.MyClass> loadAllItems();

Can we work together improving the RxRemoteMediator implementation?

This is my API definition

    @Transaction
    @Query("SELECT * FROM item_table LIMIT 20")
    fun loadAllItems(): PagingSource<Int, MyClass>

I got everything else without errors. This one is just triggered at compile time

Worth mentioning I'm using Hilt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions