18

I have an application on Samsung Smart TV. I'm fetching data from web service and display this data in my application.

I'm fetching the data periodically and updating the application accordingly.

I want to run this operation as a background process, so it'll download the data and if there is an update, I warn the user when s/he watching TV.

The other thing I want is to start application on TV launch, is it possible?

totten
  • 2,769
  • 3
  • 27
  • 41

5 Answers5

7

Only 'ticker' type application can run in background. It is not supported in Europe and will not pass certification for Samsung Apps store.

Samsung Smart TV suppots push-notifications (samsungdforum.com/Guide/art00080/index.html). It will allow you to show popup-message on screen with ability to launch your application.

Ivan Solntsev
  • 2,081
  • 2
  • 31
  • 40
4

You cannot auto-start application on TV launch.

The only way is to use custom firmware like SamyGo (http://www.samygo.tv/)

About the "background process"... as far as we assume that JavaScript's setTimeout or setInterval can be used to execute application's "internal" background process, there is no problem - Just DO it! :)

But if you were thinking about system's background process - for ex. crontab of device - it's impossible.

Adam Lukaszczyk
  • 4,898
  • 3
  • 22
  • 22
4

for your second doubt Auto launch of the application is supported in ticker applications only and there is property in config file of the ticker widget :

"<ticker itemtype="boolean">y</ticker>"

if u mark it as y(as above) than you can set up auto launch of the app from Menu->smart Hub->Apps settings->auto ticker. in 2014 Samsung Smart TV models.

Vikas
  • 419
  • 3
  • 13
2

Since Tv has limited memory I wont recommend background process like setInterval or setTimout. You may have refresh button for the same. And They must have some js api for controlling internal method of tv application (not sure). Anyway if you really want to use interval/timeout dont forget to clear it.

1

As it shown here, WebSocket is supported by Samsung Smart TV. Your server application can trigger TV application when an update is appear. It is more efficient way than polling server with ajax for your case.

(Edit) I wrote a sample application to demonstrate: https://github.com/aksakalli/socket.io-hello-world

(Edit 2) I see that your problem is about platform limits. My answer is just about approaches that can be applied then I have very limited experience on Samsung Smart TV.

Can Guney Aksakalli
  • 1,320
  • 1
  • 11
  • 24
  • WebSockets are supported beginning from SDK 2012 (leaving 2011 & 2010 devices unsupported). Furthermore, the support is not identical in all devices, not even in devices having the same model number. Some devices support only the older hixie-76 version of the WebSocket protocol (which is only supported by a few servers). – simon Apr 18 '13 at 11:38
  • Socket.IO can be used as a cross-browser WebSocket like API for that case. It respectively tries websocket, Flash, Long polling... etc then find a way to support a socket like application. I wrote a sample code at github to test on a TV Browser and it worked fine on many TVs that connected to it. https://github.com/aksakalli/socket.io-hello-world – Can Guney Aksakalli Jul 01 '13 at 13:46