cancel
Showing results for 
Search instead for 
Did you mean: 

SAP UI5 How to keep a view Session alive on TV?

haemma83
Active Participant
0 Kudos

Hello,

my customer has the requirement to show a UI5 app on an external TV all of the time. My question is now how to manage it, that the session won't get lost and the TV is not going to be black?

Thanks!
Regards

Andreas

Accepted Solutions (1)

Accepted Solutions (1)

vobu
Active Contributor
0 Kudos

as with any statleess http-base app, this would require to continuously poll an endpoint on the backend, so the session doesn't die.

https://developer.mozilla.org/en-US/docs/Web/API/setInterval might help here - but be careful of not doing this on the main thread to avoid blocking the UI. Instead, either do it in a web worker (https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) or as an async function/Promise (e.g. famous "sleep" one-liner 

const sleep = duration => new Promise(resolve => setTimeout(resolve, duration))

hth, v.

Answers (0)