I did find a bug report from 2013 that might be related: Android 56062. If that's an issue, here, you can bypass update()
and run the query directly without a convenience method.
In the meantime, there's a syntax problem with your query. Bind values with a LIKE
clause are tricky. A ?
in quotes is just a literal question mark.
WHERE foo LIKE '%?%'
The above is just a search for any foo
containing a question mark:
WHERE foo LIKE ?
The above allows you to pass in the wildcards as part of the bind param: %sometext%
.
I think that's a little ugly, though. If we know that we're always going to search with wildcards, I'd want to use concatenation:
WHERE foo LIKE '%' || ? || '%'
As an aside, I hope you realize that a query with leading and trailing wildcards can be very expensive.