I am using room database for storing json data from URL its working fine but while accessing data from data base to show on recyclerview its give one result at time and if i
Follow this or this
You didn't add LiveData in your dao. Add livedata and it will automatically return the list for you. However
In your dao
@Query("select * from table_name")
public LiveData<List<Model>> getAll();
In your activity or fragment
yourViewModel.getAll().observe(this, new Observer<List<Model>>() {
@Override
public void onChanged(@Nullable List<Model> models) {
adapter.addAll(models);
}
});