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: 
destruk
Binge Watcher

Re: Remote Consistency

Lots of things don't work correctly. Thanks for your input. I can keep hoping that minor pieces like this will be adjustable in the future. Sure it works - sure lots of channels use it as is - but that still doesn't mean it is the perfect solution and couldn't be improved somehow. I still don't like the fact someone could press the instant replay button and my channels wouldn't have a clue they did that. I like having everything in neat little boxes - like it'd be great to have the 13 SDK PDF files as 'books' in the same single PDF file to make searching easier. To have some things work one way for one situation, another for a different situation, with different methods and different properties that do the same thing in different screens, well, it looks more like a hodge podge of 20 different language speaking people piling into a clown car, rather than the professional product it should be. The end users don't care a bit about what goes on under the hood - it plays their video so they're happy. Sorry for taking up your time.
0 Kudos
TheEndless
Channel Surfer

Re: Remote Consistency

You didn't take up any of my time. I'm the one that chose to respond. I also didn't say it was perfect the way it was. I was simply explaining why I think it works the way it does, offering some counterpoints based on my experience with the SDK, and offering you some workarounds to get it to behave the way you want.

As for "the professional product it should be", you've only been around a couple of months, so you may not be aware of it, but the box started out as strictly a Netflix player when it was first introduced two years ago, and it's only had an open SDK for about a year now (maybe less). The SDK as it is now is leaps and bounds above where it started, and is constantly improving, with many of the suggestions made by developers in these forums having been implemented.

Also, as for numbers associated with buttons, not too long ago, someone from Roku said they'd be including an associative array of button IDs in a future release. Until then, the IDs for the buttons missing from your list above are...
0=Back
7=Instant Replay
10=Info (*)

There was also a discussion recently about making all of the non-intrinsically mapped buttons available on the built-in screens, which would probably address one of your main criticisms above, but I don't recall if Roku weighed in on that or not.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
TheEndless
Channel Surfer

Re: Remote Consistency

As a very simple proof of concept, here's one way to prevent the user from accidentally exiting the channel:

Sub RunUserInterface()
' Draw a facade screen as recommended in the
' developer guide
screenFacade = CreateObject("roPosterScreen")
screenFacade.Show()

StartChannel:
' launch the main channel screen
ShowMainPosterScreen()

' We won't get here unless the main poster screen closes
If Not ConfirmExit() Then
' User didn't want to exit, so relaunch the main poster screen
GoTo StartChannel
End If
End Sub

Sub ShowMainPosterScreen()
' Draw the poster screen that serves as the root of
' the channel
screenMain = CreateObject("roPosterScreen")
screenMain.SetMessagePort(CreateObject("roMessagePort"))
screenMain.SetContentList([{ ShortDescriptionLine1: "Placeholder" }])
screenMain.Show()

While True
msg = Wait(0, screenMain.GetMessagePort())
If msg <> invalid Then
If msg.IsScreenClosed() Then
Exit While
End If
End If
End While
End Sub

Function ConfirmExit() As Boolean
' Confirm that the user wants to exit
dialog = CreateObject("roMessageDialog")
dialog.SetMessagePort(CreateObject("roMessagePort"))
dialog.SetTitle("Exit Channel")
dialog.SetText("Are you sure you want to exit the channel?")
dialog.AddButton(1, "Yes")
dialog.AddButton(2, "No")
dialog.Show()
While True
msg = Wait(0, dialog.GetMessagePort())
If type(msg) = "roMessageDialogEvent"
If msg.isButtonPressed() Then
Return msg.GetIndex() = 1
End If
End If
End While
Return True
End Function
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
destruk
Binge Watcher

Re: Remote Consistency

Thanks. Luckily the Up arrow doesn't automatically close a dialog screen either.
0 Kudos