ParseObject request = new ParseObject(“Requests”);
request.put(“requesterUsername”, Parse.getCurrentUser().getUsername());
ParseACL parse ACL = new ParseACL();
parseACL.setPublicWriteAccess();
request.setACL(parseACL);
request.saveInBackgroud(new SaveCallback())
And also want to delete a requests in class:
ParseQuery<ParseObject> query = new ParseQuery<ParseObject>(“Requests”);
query.whereEqualTo(“requesterUsername”, ParseUser.getCurrentUser().getUsername());
query.findInBackground(new FindCallback<ParseObject>(){
@overrider
public void done(List<ParseObject> objects, ParseException e){
if(e == null){
if(object.size()>0){
for (ParseObject object : object){
object.deleteInBackground();
}
}
}
}