1
requestBuilder.or("userPhone",myPhone,phoneList);
        }
    }

    QBCustomObjects.getObjects("image", requestBuilder, new QBCallbackImpl() {

"phoneList" is arrayList of Strings. now on my device this code work well but on samsung devices i have crash : "java.lang.IllegalArgumentException: Illegal character in query at index 147: https://api.quickblox.com/data/image.."

now i know for sure that the arrayList making the problem, because if i put instead of phoneList just , "00000", "09878889" - it's work fine. what to do? thanks..

Edit:

ArrayList<String> al = new ArrayList<String>();
            HashSet<String> hs = new HashSet<String>();
            hs.addAll(phoneList);
            al.clear();
            al.addAll(hs);

            String[]arrString = new String [al.size()+1];
            for (int j = 0; j < al.size(); j++) {
                String str = al.get(j).toString();
                arrString[j+1]= str;
            }
            arrString[0]= myPhone;
            requestBuilder.or("userPhone",arrString);

this is my solution, but i discovered that if "arrString" is bigger than 600+ it's doesn't work, why is that?

Cohelad
  • 121
  • 9

1 Answers1

1

Let me explain how OR operator works:

1) for example, you have name field

To get all records with name Alex OR Garry use next query:

requestBuilder.or("name", "Alex", "Garry");

2) for example, you have name field and age field

To get all records with name Alex OR age 22 use next query:

requestBuilder.or("name", "Alex");
requestBuilder.or("age", "22");

Try somtehing like this

Rubycon
  • 18,156
  • 10
  • 49
  • 70
  • 1
    thanks, i understand that, but if i want: requestBuilder.or("name", "Alex", "Garry","Leon","Yohan","Nora".....); and more names? i'v put all the names in arraylist, as i say, it's work on my device, but on other deevice i need to put all names on String array but it's work just if the String array is less than 600+... – Cohelad Feb 12 '14 at 07:50