I am having trouble adding my message as a relation in parse. I am not getting any error and nothing is submitting inside of Parse.
Group has relationship Messages Group has already been set at the top of the page.
ParseObject messageToSend = new ParseObject("Message");
messageToSend.put("FromUser", ParseUser.getCurrentUser());
messageToSend.put("Content", uiMessageToSend.getText().toString());
ParseRelation<ParseObject> relation = Group.getRelation("Messages");
relation.add(messageToSend);
Group.saveInBackground();
ParseObject messageToSend = new ParseObject("Message");
messageToSend.put("FromUser", ParseUser.getCurrentUser());
messageToSend.put("Content", uiMessageToSend.getText().toString());
ParseRelation<ParseObject> relation = Group.getRelation("Messages");
messageToSend.put("YOUR_RELATION", relation);
messageToSend.saveInBackground();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.