Hello,
It is very simple to delete an item or row from any parse table from the code.
First, we need to create the object of the table that points that particular row and then delete it.
I create an object using object id and then execute delete() method of the parse.
Below is the code
ParseQuery<ParseObject> query = ParseQuery.getQuery("Table_Name");
query.getInBackground("our_object_id", new GetCallback<ParseObject>() {
public void done(ParseObject object, ParseException e) {
if (e == null) {
try {
object.delete();
Toast.makeText(getActivity(),"Video deleted successfully.",Toast.LENGTH_LONG).show();
gettingListVideos();
} catch (ParseException e1) {
e1.printStackTrace();
}
PitchLogger.createLog("pos( " + object.get("position"));
} else {
PitchLogger.createLog("Error " + e.getMessage());
}
}
});
0 Comment(s)