I'm trying to fix this issue for like past 12 hours.
I've finally narrowed down the problem to - When I use the following code, I'm not able to pin the object. When I run the query later, it returns zero results.
ParseFile file = new ParseFile("image.png", byteArray);
file.saveInBackground();
chatObject.put("picture", file);
But, when I don't add ParseFile to the chatObject, I'm very well able to pin the object and query it later.
The following is the way I'm pinning the object -
chatObject.pinInBackground("unsent", new SaveCallback() {
@Override
public void done(ParseException e) {
if (e != null) {
e.printStackTrace();
}
}
});
I'm pretty sure my code is correct. Anybody knows how to fix this ?