As I've been building my app, I've noticed that sometimes my app exits unexpectedly. Eventually, I figured out that if instead of creating and closing roPosterScreens for my various pages, if I just create a single roPosterScreen and keep updating the contents, that keeps the app from exiting. Today, I just noticed in one of the example apps, /simplevideoplayer/source/appMain.brs, the following comment:
'has to live for the duration of the whole app to prevent flashing
'back to the roku home screen.
screenFacade = CreateObject("roPosterScreen")
screenFacade.show()
I assume this addresses the same issue I noticed. I can't find any documentation that talks about lifetimes of screens and when an app exits. Is this documented somewhere? Could you point me to the right place?
What happens if you show() more than one screen? Does the more recent one just overlay the first? And if you close() the one on top, does the first one now get exposed?