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: 
quantumguy
Visitor

roSpringboardScreen button highlight

I have four buttons on the springboard screen. I want to highlight the next button after the event relating to button no. 1 is completed. Is this possible? For example, if my button 1 is labeled "Preview" and after the user is done previewing the video, I want my next button - labeled "Purchase" to be highlighted when it goes back to springboard screen.
0 Kudos
7 REPLIES 7
RokuChris
Roku Employee
Roku Employee

Re: roSpringboardScreen button highlight

There's not a direct way to do that, but you might be able to achieve the same effect with the External Control Protocol by sending a down button press at the appropriate moment.
0 Kudos
quantumguy
Visitor

Re: roSpringboardScreen button highlight

Can a send a "down" button press from within the main brs file? I doubt it from the looks of this example - http://blog.roku.com/developer/2011/10/ ... arameters/
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: roSpringboardScreen button highlight

Yes, it is possible to use ECP from within BrightScript. You can find the IP of the box using roDeviceinfo, then make ECP calls using roURLTransfer. There should be very few cases where you would need/want to do so, but for what you're trying to do, it might be a possible solution.
0 Kudos
quantumguy
Visitor

Re: roSpringboardScreen button highlight

Awesome, thanks so much!
0 Kudos
gonzotek
Visitor

Re: roSpringboardScreen button highlight

"RokuChris" wrote:
Yes, it is possible to use ECP from within BrightScript. You can find the IP of the box using roDeviceinfo, then make ECP calls using roURLTransfer. There should be very few cases where you would need/want to do so, but for what you're trying to do, it might be a possible solution.
quantumguy, here's a snippet from something I've been working on that should help get you started:

Function GetRokuLocalIP() As String
deviceInfo = CreateObject("roDeviceInfo")
ipAddresses = deviceInfo.GetIPAddrs()
For Each key In ipAddresses
ipAddress = ipAddresses[key]
If ipAddress <> invalid And ipAddress.Len() > 0 Then
Return ipAddress
End If
Next
Return ""
End Function

ip = GetRokuLocalIP()
xfer = CreateObject("roURLTransfer")
ECPUrl= "http://" + ip + ":8060/keypress/Down"
xfer.SetURL(ECPUrl)
result = xfer.PostFromString("") 'Note:Most commands in the ECP protocol expect an empty POST body.
See the ExternalControlGuide.pdf of the sdk for more info.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
quantumguy
Visitor

Re: roSpringboardScreen button highlight

I already had got it working. Thanks though! Yes I followed the ECP guide in the SDK documentation.
0 Kudos
gonzotek
Visitor

Re: roSpringboardScreen button highlight

"quantumguy" wrote:
I already had got it working. Thanks though! Yes I followed the ECP guide in the SDK documentation.

No problem 🙂
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos