override fun onResume() {
/**Create your sections’ receiver**/
bRec = MBurgerApiActionInitializer.initializeNookoReceiverForSections(this, this)
/**Add custom filters to the API call or leave it null**/
val arrayOfFilters : ArrayList<Any> = null
/**Id of the block you wish to retrieve sections**/
val block_id = block.getId()
/**Inside the sections the “elements” field will be valorized**/
MBurgerTasks.askForSections(this, block_id, arrayOfFilters, getElements)
MBurgerApiActionInitializer.pauseNookoReceiver(getActivity(), bRec)
override fun onApiResult(response: MBAPIResponse ) {
if (response.getResult()) {
val sections = response.getPayload().get(MBApiPayloadKeys.key_sections) as ArrayList<MBSection>
if (sections.size() > 0) {
Log.w(“WARNINGS HOME”, “THE HOME’ S SECTION IS EMPTY”)
Log.e(“ERROR RESPONSE API”, “THERE WAS AN ERROR DURING HOME’ S LOADING”)