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
Streaming Star

roSpringboard Screen 'bug'

If you don't have any buttons on a springboard screen, then you can't close the screen with the UP button on the remote control. The only way I can find to make it quit is to press the home button.

ie consider this code -

Function displayAudioDetailScreen(category as Object) As Integer
port=CreateObject("roMessagePort") 'create message port
audioPlayer=CreateObject("roAudioPlayer") 'create audio player
audioPlayer.SetMessagePort(port) 'set the audioplayer to use the created message port
screen=CreateObject("roSpringboardScreen") 'create a springboard screen
screen.SetMessagePort(port) 'set the message port for the springboard screen to the same port audio player uses

category.url="http://72.167.123.75:8040/" 'replace the passed content for testing purposes
category.streamformat="mp3" 'audioplayer will not play if the streamformat is not set
audioPlayer.AddContent(category) 'import content into the audio player component

'screen.AddButton(1, "Play") 'commented out to show point of failure
'screen.AddButton(5, "Stop")

screen.SetContent(category) 'populate the screen with the content for thumbnail/title/etc etc
screen.Show() 'show the screen
audioplayer.play() 'start playing the live mp3 stream
While TRUE
msg=Wait(0,screen.GetMessagePort()) 'wait for an event
If Type(msg)="roAudioPlayerEvent" 'these work and stream plays - says startup progress, etc etc
If msg.isStatusMessage() Then
Print"roAudioPlayerEvent: ";msg.GetMessage()
End If
Else If Type(msg)="roSpringboardScreenEvent"
If msg.isRemoteKeyPressed() 'this event should be firing regardless of buttons on the screen, but they don't
If msg.GetIndex()=2
audioplayer.stop()
screen.close()
Exit While
End If
End If
If msg.isScreenClosed() 'screen is never closed until HOME is pressed
Print"Screen closed"
Exit While
Else If msg.isButtonPressed() 'without a button displayed on the springboard, this works correctly and does not fire
Print"ButtonPressed"
If msg.GetIndex()=1 audioplayer.Play()
If msg.GetIndex()=5 'close screen
audioplayer.stop()
screen.close()
Exit While
End If
Print"Button pressed: ";msg.GetIndex();" ";msg.GetData()
End If
Else
Print"Unexpected message class: ";Type(msg)
End If
End While
Return 0
End Function


If I uncomment button 1 (PLAY), and/or button 5 (STOP), then the up key on the remote works to close the screen. But without any buttons displayed, if I just simply want the artist information, release date, and springboard screen to populate with no user-selectable onscreen buttons, then as soon as the screen is displayed all user interaction dies with home being the only viable choice to get out of it. I could probably get it to close the screen forcibly with a timer or by looking for the end of playlist event, but that kind of defeats the point that this instance kills the remote interface notifications.
0 Kudos
2 REPLIES 2
RokuChris
Roku Employee
Roku Employee

Re: roSpringboard Screen 'bug'

That's a known behavior. viewtopic.php?f=34&t=27771
0 Kudos
destruk
Streaming Star

Re: roSpringboard Screen 'bug'

Thanks Chris. I didn't know what to search for from 2 years ago. 🙂
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.