Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tvn
Visitor

Poster screen closes when UP on remote is pressed

Hi,
I have a weird issue where my poster screen closes when I press UP on the remote.

Here's the code:

Function Main()
initTheme()

screenFacade = CreateObject("roPosterScreen")
screenFacade.Show()

token = Auth()

print "showing poster"
port = CreateObject("roMessagePort")
poster = CreateObject("roPosterScreen")
poster.SetMessagePort(port)
poster.SetListStyle("arced-16x9")
episodes = GetEpisodes(token)
poster.SetContentList(episodes)
poster.Show()

While True
message = wait(0, port)
If message.isScreenClosed() Then
print "screen closed ";message.GetMessage()
return -1
Else If message.isListItemSelected()
print "message: ";message.GetMessage();"index: ";message.GetIndex()
displayVideo(poster.GetContentList()[message.GetIndex()])
else
print message.GetMessage()
End If
End While

screenFacade.showMessage("")
sleep(25)
End Function

Every time I press up, the screen closed event gets fired and the app exits.

I'm sure it's just something obvious I'm missing, any ideas?
0 Kudos
6 REPLIES 6
RokuChris
Roku Employee
Roku Employee

Re: Poster screen closes when UP on remote is pressed

That's normal. Most screens do that. Older remotes don't have a BACK button, so UP is a standard way to pop screens off the stack.
0 Kudos
tvn
Visitor

Re: Poster screen closes when UP on remote is pressed

Why does the Netflix app not behave this way?

Also if I add breadcrumbs to the top of the poster screen I'm not able to navigate up to them.
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Poster screen closes when UP on remote is pressed

"tvn" wrote:
Why does the Netflix app not behave this way?

Also if I add breadcrumbs to the top of the poster screen I'm not able to navigate up to them.


Netflix does behave that way on all its screens except the grid. Exiting a roGridScreen via the UP button is optional and can be toggled with the SetUpBehaviorAtTopRow() function. http://sdkdocs.roku.com/display/RokuSDKv48/roGridScreen

Breadcrumbs are not focusable. Sounds like maybe you want to add a filter bar to your poster screen. You can do that with SetListNames(). http://sdkdocs.roku.com/display/RokuSDK ... sterScreen
0 Kudos
tvn
Visitor

Re: Poster screen closes when UP on remote is pressed

That makes sense. I was thinking the breadcrumbs could be used for navigation but I see that it's just for reference.

Would a filter bar be the best way to access a secondary screen? Basically I'm wanting to have a button somewhere so they can go to a screen that will allow them to do things like unlink their account, etc.
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Poster screen closes when UP on remote is pressed

"tvn" wrote:
Would a filter bar be the best way to access a secondary screen? Basically I'm wanting to have a button somewhere so they can go to a screen that will allow them to do things like unlink their account, etc.


That's one option, TuneIn Radio does that. You could also use the (*) button to bring up an options dialog like Netflix. Or use a roListScreen instead of a poster screen and put your Settings item there, similar to Amazon Video.

Play around with some of the existing channels on the platform and see what works best for your situation.
0 Kudos
destruk
Binge Watcher

Re: Poster screen closes when UP on remote is pressed

Not all remotes have an option button ( * ) , so for a poster screen, to set options, it'd probably be a good idea to use the filter bar to select options, a discrete selection in the content list to set options, or a different kind of screen that will allow you to set your own solution into place.
0 Kudos