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.

That’s a known behavior. viewtopic.php?f=34&t=27771

Thanks Chris. I didn’t know what to search for from 2 years ago. :slightly_smiling_face: