Query the API for items
Create a basic UI with 3 views (CiewControllers for iOS and activities for Android) and a tab bar.
Each view will represent a section of the app (Home, News, and Gallery).
To obtain the content that will be displayed in the views, call this function with the id of the block that you can see from the dashboard:
MBClient.getSectionsWithBlockId(THE_BLOCK_ID, parameters: nil, success: { (sections, paginationInfos) in
}, failure: { (error) in
MBurgerTasks.askForSections(context, HOME_BLOCK_ID, null, true, listener)
public void onSectionsApiResult(ArrayList <MBSection> sections, long block_id,
MBPaginationInfo paginationInfos) {
ArrayList <Home> homePages = new ArrayList <> ();
for (int i = 0; i < sections.size(); i++) {
Home home = mapHome(sections.get(i));
Now you need to create Home objects from MBSection objects in order to create an array of Homepages we will use the mapping functions of the section object to do this.
Copy link