Links
Comment on page

Delete a Section/Media

In order to delete a specific section you will need to obtain the id from the MBSection objects you will retrieve through APIs.
Then you will just have to call the static method
MBurgerAdminTasks.deleteSection(this, section_id);
which will return back the section_id, with the listener MBAdminApiDeleteSectionListener and from the callback bundle in “action” mode using the MBApiPayloadKeys.key_section_id.
Deleting a media from a section is pretty similar:
MBurgerAdminTasks.deleteMedia(this, media_id);
where media_id is the id of the media element you wish to delete, it can be used with both files and images.
This method will return back the media_id, with the listener MBAdminApiDeleteMediaListener, and from the callback bundle in “action” mode using the MBApiPayloadKeys.key_media_id.
It’s suggested to maintain the MBObjects (MBImage for example) instead of simple values in order to maintain the media_id in a simpler way.