Forum Discussion
- destrukStreaming StarHere is a simple use case - we want to track how many users are logged into the channel for months or years at a time without logging out. We're also interested in market research to find out what percentage of users have disabled the screensaver vs what percentage have it set to 10 minutes or longer without pinging their roku or unnecessarily hitting our servers to collect this information. If the screensaver is on and the roku channel app displays a dialog box the screensaver doesn't turn off unless the user does something on the remote. More hard data about screensavers wouldn't be a bad thing would it?
- EnTerrRoku Gurudescribe your use-case in more detail please. E.g. my channel does this and this - and i have (don't have) private screensaver as part of it etc etc
- EnTerrRoku Guru
"destruk" wrote:
Here is a simple use case - we want to track how many users are logged into the channel for months or years at a time without logging out.
Isn't there some timer that kicks out of the channel and to Home screen if it has been inactive for couple of hours or some such? That would make the answer 0 users 🙂We're also interested in market research to find out what percentage of users have disabled the screensaver vs what percentage have it set to 10 minutes or longer without pinging their roku or unnecessarily hitting our servers to collect this information. If the screensaver is on and the roku channel app displays a dialog box the screensaver doesn't turn off unless the user does something on the remote. More hard data about screensavers wouldn't be a bad thing would it?
In a perfect world, ask a Roku rep and they may tell you that. Or, the answer may be "nunya business" - in which case that won't be doable via API either :). But, hmm - have you tried ECP /query/active-app ? It's been documented for almost a year, without a drumroll. - belltownRoku GuruifAppManager.GetScreensaverTimeout() will tell you what the user's screensaver wait time is set to, zero if it's disabled.
ifAppManager.UpdateLastKeyPressTime() can be used to prevent the channel returning to the Home screen (ever), allowing the channel to run for many years continuously.
In Scene Graph applications, I believe the render thread does not run while the screensaver is active, so if you have a way for the render thread to communicate with a Task thread, which will continue running while the screensaver is running, you might be able to determine in your Task whether the screensaver is running or not, by the absence of such communication. - destrukStreaming StarThanks guys.
- Aleksandr_SamVisitorAre there any events that can be triggered when the screensaver comes on?
- belltownRoku Guru
"Aleksandr_Sam" wrote:
Are there any events that can be triggered when the screensaver comes on?
Only when the screensaver exits. There's an roDeviceInfoEvent generated:
https://sdkdocs.roku.com/display/sdkdoc/ifDeviceInfo#ifDeviceInfo-EnableScreensaverExitedEvent(enableasBoolean) - tutashBinge WatcherYeah. There's a way to figure this out. Knowing how long to wait and knowing when to start waiting kinda gives you the answer.
- sharjeelasgharChannel Surfer
These approaches involve low-level system interactions and require appropriate permissions. For cross-platform solutions, consider using calculadora de porcentagem, libraries or APIs specific to your application's framework.
Related Content
- 5 months ago
- 2 years ago
- 4 months ago
- 5 months ago