Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

Where is screensaver documentation?

I am having trouble finding the developer documentation for implementing a screensaver. I have found useful information in the clock example app, and have found useful information on the forum. However, I cannot find any official documentation from Roku on implementing a screensaver. I would like to know which objects are supported in a screensaver. I see that roImageCanvas is supported. However, I don’t think roParagraphScreen is supported, but I cannot verify that yet. Am I overlooking something?
0 Kudos
15 Replies
Highlighted
Level 7

Re: Where is screensaver documentation?

Basically any component that accepts user input is not supported in a screensaver, as it wouldn't make sense. Below is the list of such components. If you try to create one of these in a screensaver, you should see a message like this on the debug console:

** ERROR ** Cannot create roParagraphScreen: Not supported in a screen saver.

You're right, this should be added to the documentation.

roAudioPlayer
roChannelStore
roCodeRegistrationScreen
roGridScreen
roKeyboardScreen
roListScreen
roMessageDialog
roOneLineDialog
roParagraphScreen
roPinEntryDialog
roPosterScreen
roSearchHistory
roSearchScreen
roSpringboardScreen
roTextScreen
roVideoPlayer
roVideoScreen

--Mark
0 Kudos
Highlighted
Level 10

Re: Where is screensaver documentation?

So where is the documentation?
I have specific question too, from viewtopic.php?f=34&t=66492&p=425734#p425734 i wonder:
"EnTerr" wrote:
... my understanding so far is that the active channel gets paused and screen saver runs until interrupted, is that not the case? In particular i am foggy on what happens if channel Foo is running in regular mode when screen saver kicks-in and the chosen screensaver is Foo as well (i.e. Foo advertised itself as screen saver and was chosen in Settings); is new context spawned - or call is forced within regular Foo - or no saver is called - or crash happens?
0 Kudos
Highlighted
Roku Employee
Roku Employee

Re: Where is screensaver documentation?

Hi EnTerr,

The active channel is not paused while a screensaver runs, the Screensaver runs in a separate thread and the channel continues to run. If the Screensaver it is signed with the same Dev ID as the channel, you will be able to pass data back and forth between the running channel and screensaver by writing files to the shared tmp:/ folder.

As far as docs go, we don't have detailed "how to" but it is fairly easy to figure out from the examples in the SDK.

I've filed a bug on the missing docs on your behalf.

-Joel
0 Kudos
Highlighted
Level 10

Re: Where is screensaver documentation?

"RokuMarkn" wrote:
Basically any component that accepts user input is not supported in a screensaver, as it wouldn't make sense. Below is the list of such components. If you try to create one of these in a screensaver, you should see a message like this on the debug console:

** ERROR ** Cannot create roParagraphScreen: Not supported in a screen saver.

RokuMarkn -
your explanation is great, glad you listed the no-no components, i ran into this too - got "Screen preview failed" with roParagraphScreen facade.

But there is NO ERROR shown on the console. In fact, seems that no PRINT statements from the screensaver code make it to the console whatsoever. Is this by design (e.g. since another thread is hogging the console)? Can it be circumvented, so i can see debug info while testing the screensaver?
0 Kudos
Highlighted
Level 7

Re: Where is screensaver documentation?

"EnTerr" wrote:
"RokuMarkn" wrote:
Basically any component that accepts user input is not supported in a screensaver, as it wouldn't make sense. Below is the list of such components. If you try to create one of these in a screensaver, you should see a message like this on the debug console:

** ERROR ** Cannot create roParagraphScreen: Not supported in a screen saver.

RokuMarkn -
your explanation is great, glad you listed the no-no components, i ran into this too - got "Screen preview failed" with roParagraphScreen facade.

But there is NO ERROR shown on the console. In fact, seems that no PRINT statements from the screensaver code make it to the console whatsoever. Is this by design (e.g. since another thread is hogging the console)? Can it be circumvented, so i can see debug info while testing the screensaver?

I think it was already answered in your other thread, but can't hurt to post it here too... you can telnet to port 8087 to see the output from the screensaver thread.
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
Highlighted
Level 10

Re: Where is screensaver documentation?

"TheEndless" wrote:
I think it was already answered in your other thread, but can't hurt to post it here too... you can telnet to port 8087 to see the output from the screensaver thread.
Yes, telnet 8087 is the screensaver console, now i know. It can be ^C interrupted (with the usual 50/50-chance-of-staying-in-debug bug).

"** ERROR ** Cannot create roParagraphScreen: Not supported in a screen saver." pops as a warning there.
0 Kudos
Highlighted
Level 10

Re: Where is screensaver documentation?

"RokuJoel" wrote:
The active channel is not paused while a screensaver runs, the Screensaver runs in a separate thread and the channel continues to run. If the Screensaver it is signed with the same Dev ID as the channel, you will be able to pass data back and forth between the running channel and screensaver by writing files to the shared tmp:/ folder.

Thank you, RokuJoel - that short explanation helped me a lot to grasp how sandboxing is done in this case, so credit due.

Including to imply (then test) that variables are not shared between main() and RunScreenSaver(). Since there is no shared memory, we should not talk about "threads" from outside developer point of view; logically these are more of (pseudo)processes, even if physically implemented by C threads in Roku executable.

Besides tmp:/, I found another means for main/screensaver "interprocess" communication: roRegistry. Registry i think is better choice for fast messaging between the two, since all happens in RAM and there is no need to reg.flush() - one can do reg.write() and the other right away reg.read() and see the result. Let me know if there is issue with relying on that behavior.
0 Kudos
Highlighted
Level 10

Re: Where is screensaver documentation?

Adoration.
0 Kudos
Highlighted
Level 10

Re: Where is screensaver documentation?

Why is it, after nearly 8 years of this forum, is it literally impossible to add an anti-spam filter?
0 Kudos