I have an object
public class ArticleList extends RealmObject {
@PrimaryKey
private String id;
private String title;
private String subtitle;
private String image;
private String category;
}
What I want to do is to fetch result from Realm and them convert result to ArticleList[]
Fetch I do by using
RealmResults<ArticleList> results = realm.where(ArticleList.class).equalTo("category", "CategoryName").findAll();
What do I have to do next to get an array of objects ?
Simplest to convert into java ArrayList:
ArrayList<People> list = new ArrayList(mRealm.where(People.class).findAll());