Make a check for parseObjects == null
as i believe you are getting parseObjects
as null.
qp.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> parseObjects, ParseException e) {
if (e != null)
e.printStackTrace();
if(parseObjects!=null)
{
for (int i = 0; i < parseObjects.size(); i++) {
Photo pp = new Photo();
ParseObject o = parseObjects.get(i);
pp.isActive = true;
pp.place = o.getString(Photo.PLACE);
ParseFile f = o.getParseFile(Photo.PHOTO);
pp.url = f.getUrl();
p.photos.add(pp);
}
Photo.increaseDownloaded();
}
else
{ // Toast here
}
}
});
2
solved Android App crashed with parse in a for loop