This is My RealmObject:
public class Channel extends RealmObject{
private String id = "";
private String name = "";
...
I am trying to construct a query where each string in a list of string contains (not equal) to the "name" field. I am aware I can use the in() method with a ArrayList, but the in() method validate if the string EQUALS and rather need CONTAINS.
I have tried the following:
realm.where(Channel.class).rawPredicate("name CONTAINS[c] $0",list.toArray()).findAll()This perform the query only on the first String in "list"realm.where(Channel.class).in("name", list.toArray()).findAll()is performing there search only if the field "name" EQUALS to any of the Strings in the list, where I need it to search if the field CONTAINS any of the values in the List of Strings
Any ideas of how to use a method just like in() but that will compare if the string equals or contain the field value?
Thanks
try this