Right now my code looks like this:
Cursor cursor = getContentResolver().query(messagesUri, null,"address=?", smsNo, null);
where smsNo is a singleton array.
I would like to add elements to this array and implement an OR operation in the WHERE clause. Is this possible to do continuing to use an array?
I’m not quite sure what you’re asking, but you certainly can continue to use an array here. If you’re asking how to extend an existing array to have more items, you can use Arrays.copyOf(oldArray, newSize) to make additional space in it. And you can then just use multiple ? placeholders in your query string to reference the new items.
For example: