Skip to content

Debugging AIR apps on Samsumg Smart TVs

I was trying to find anything that would allow me set up debugging for Samsung Smart TVs but I only found it wasn’t doable.
It is not true. It is possible. So I decided to write a post how to set up debugging for AIR apps on Samsung Smart TVs.

I am using Flash Builder, but my mate Huv is using IntelliJ, it is much easier to set it up with IntelliJ.
BTW kudos to Huv, for sharing the knowledge :)

So, I will briefly mention what is required (anyone doing Samsung dev should be familiar with most of the stuff).

So we have AIR project, targeting AIR 2.5 and we do a release build. Make sure you add -debug=true in compiler arguments.
Once we have the AIR file, we can pretty much scrap the AIR project.

In order to get it to work on the TV, change AIR extension to ZIP.

You Also need to include config.xml in that ZIP for it to work on Samsung telly.

Second thing you need to do is include file that will only contain your IP address. that is the only thing the file should have.

Put both files there and copy the zip file.

Once you have that sorted, you need to set a local server ISS, apache, whatever running as your localhost.

The server should have widgetslist.xml with the location of the widgets, etc you can find more on Samsung Dev Forums on that.

So once you upload your app to the telly and are ready to run it you need to set up the debugger.

You could do it the command line way: java -jar SDK/libs/fdb.jar
run http://localhost

but wouldn’t it be way cooler to hook it up to Flash Builder console panel?

In order to get that sorted, you basically need to change the nature of your project to web application.
Flash Builder is unfortunately stupid enough to allow you to specify what to run when you have AIR app,
IntelliJ has got this decoupled.

So, the quickest way is to duplicate your project (in case you mess something up in the future)
and edit .project file to be a flash one.

Create a new project, copy the .project or just paste the following:

<?xml version="1.0" encoding="UTF-8"?>

That will make the project basic AS project again.

Once you have this running in FB, create new Debug Configuration,
Uncheck USE DEFAULT for “URL or path to launch”
and type in http://localhost

Run the debug configuration and you should see you default browser launching localhost.

Now do the standard login as “develop” 123456, Settings –> Development –> Sync.

Now you can launch the app on the TV, the app is going to use the IP from the file to send the debug info to
and the debugger will be listening for it there.

If you did everything correctly you should see all the traces in the console panel.
Breakpoints should work too :)

If not make sure you run the debug before you launch the app on the telly.

To soothe the process I recommend writing ANT scripts that will now take your swf (from your as project)
unzip the AIR renamed to ZIP file, replace the swf in the zip file, zip in up again and copy to where your localhost is running from.

It is a bit annoying, that you cannot push to the TV directly, so to see if the change you made has resolved the issue,
you need to login as “develop” 123456, Settings –> Development –> Sync.

Apart from the sync, the rest can be nicely automated and that’s what I am gonna do now, so laterz…

Any questions give me shout.


Posted in development.

Tagged with , , , , , , , , , .

4 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Sean says

    Any chance SDK 4.6 will be supported for Smart TVs?
    No news from Adobe or Apache….

  2. Mike G - Lime Rocket says

    Hey Tom thanks for sharing.

  3. Kimberley Keen says

    You were truly amazing Tom. I had so much effort giving debugs air apps on samsung smart TVs but I failed. It was a delightful idea and I owe you a lot for sharing it. Good job.

  4. admin says

    IT probably won’t until 2013 line, so I wouldn’t wait for it if I were you.

Some HTML is OK

or, reply to this post via trackback.