Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

Reload Category Feed - How?

Hello,
I am attempting to modify the VIDEOPLAYER sample. At this point all my attempts to do the following have failed.

What I would like to do is RELOAD the CATEGORY FEED with a NEW FEED that I will pass in.

For example, in the file categoryFeed.brs we find the following function

Function InitCategoryFeedConnection() As Object

conn = CreateObject("roAssociativeArray")

conn.UrlPrefix = "http://rokudev.roku.com/rokudev/examples/videoplayer/xml"
conn.UrlCategoryFeed = conn.UrlPrefix + "/categories.xml"


one of the posters is a Special Category (CATEGORIES2)that passes a new XML to the function InitCategoryFeedConnection()
(categories2.xml)

I can see in the debugger that the function fires with the new xml being passed however, the screen doesn't update.

So, my question is, how can I get the new category list to display. There must be some sort of refresh that is not getting triggered so, I apparently need to pass some more functions to make this new XML load. I have tried a bunch of things that have all failed so I am hoping someone can be specific as to what I need to trigger.

Even if you can point me to how to reload the original feed from clicking on one of the category poster screens, it will get me going on the right direction.

Thank you for your help
Banta
0 Kudos
1 Reply
Level 9

Re: Reload Category Feed - How?

Although this is not an advisable way to navigate in your channel (doesn't follow the design guidelines), it is possible in the SDK to do this....

In your event loop, you could make to of the posters select between two different categories (that you initialize from the xml feeds above), and change the filter bar based on the selection. Remember to call Show() after changing the filter bar to make the screen refresh.

else if msg.isListItemSelected() then
if (msg.GetIndex() = 1) then
screen.SetListNames(Categories2)
screen.Show()
else if (msg.GetIndex() = 2)
screen.SetListNames(Categories1)
screen.Show()
else
newIndex = showSpringboardScreenWithNav(Items, msg.GetIndex())
screen.SetFocusedListItem(newIndex)
endif
endif
0 Kudos