content: ' ********** Copyright 2020 Roku Corp.  All Rights Reserved. **********
  
  ' Note that we need to import this file in MainScene.xml using relative path.
  
  sub RunContentTask(practiceId as String)
      print "parameter"; practiceId
      m.contentTask = CreateObject("roSGNode", "MainLoaderTask") ' create task for feed retrieving
      ' observe content so we can know when feed content will be parsed
      m.contentTask.ObserveField("content", "OnMainContentLoaded")
      m.contentTask.practiceId = practiceId
      m.contentTask.control = "run" ' GetContent(see MainLoaderTask.brs) method is executed
      ' m.loadingIndicator.visible = true ' show loading indicator while content is loading
  end sub
  
  sub OnMainContentLoaded() ' invoked when content is ready to be used
      ' m.GridScreen.SetFocus(true) ' set focus to GridScreen
      ' m.loadingIndicator.visible = false ' hide loading indicator because content was retrieved
      ' m.GridScreen.content = m.contentTask.content ' populate GridScreen with content
      ' m.LoginScreen.practiceId = m.contentTask.practiceId 
      ' print "onContentLoaded"; m.LoginScreen
      showPlaylistReadyScreen(m.contentTask.practiceId)
  end sub