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

Re-drawing canvas when resuming from screen saver

Hi guys!

I am playing a bit with Image Canvass building a custom grid. I am setting up 2 of them. A more elaborated on in the background (canvas 1) and a simple one that will only display the selector on the top (canvas 2). I am using this approach so the app will move smother and faster on less fortunate devices (older ones).

Everything works fine. But I have a problem when returning form screensaver. The screen is black and I need to redraw canvas 1. If there anything I can do to intercept that event (coming back form screen saver) in order to redraw canvass 1? I am already redrawing canvas1 after I play a video/load a list/etc.

Or maybe I need to use another approach?

Thanks!
0 Kudos
3 REPLIES 3
sk_bruce
Visitor

Re: Re-drawing canvas when resuming from screen saver

Hi!

Is this a confirmed bug or I am doing something wrong?

Thanks!
0 Kudos
renojim
Community Streaming Expert

Re: Re-drawing canvas when resuming from screen saver

I dealt with this a few years ago. It seems nothing's changed. There's no event to let you know the screen saver status, but it sure would be nice if there was. There's two approaches I've used:
  • Periodically send button presses using ECP such that the screen saver never appears.
  • Use a private screen saver within the app and have it report its status via tmp:/ (I periodically write a file to tmp:/ within the screen saver and check for the presence of that file within the main app; it's a little more complicated than that, but you get the gist).

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
EnTerr
Roku Guru

Re: Re-drawing canvas when resuming from screen saver

Seems clearly a bug, since other screens recover after screensaver.
I imagine a fix is, on return from SS to:
  • either roImageCanvas to get "automagically" called its Show() method

  • or get a roImageCanvasEvent about it, something like "isDirty()"
0 Kudos