I have been try to implemented the Paging Library with Room provided by google in Android Architecture Component.But its showing compile time error in my UserDao Class
Here is the Error:
Error:(22, 42) error: Not sure how to convert a Cursor to this method's return type
My Question is what return Type ?
UserDao.java
@Dao
public interface UserDao {
@Query("SELECT * FROM user")
LiveData> getAll();
//Compile Error is here : Not sure how to convert a Cursor to this method's return type
@Query("SELECT * FROM user")
LivePagedListProvider userByPagination();
}
Here the UserModel.java
public class UserModel extends AndroidViewModel {
private final UserDao userDao;
public UserModel(Application application) {