How to Build & Deploy a Samsung Smarttv App Without the Ide (E.G: on Linux)

How to build & deploy a Samsung SmartTV app without the IDE (e.g: on Linux)

I've had a reasonable amount of success setting up a development environment on my Ubuntu machine and I'd like to share my methods here for anyone looking to do the same. This answer is intended to be platform independent, so the same advice should work on any fully fledged operating system.

Introduction

First off, the question's assumptions regarding app structure are correct. A JavaScript application consists of the following items:

  • config.xml, a simple configuration file defining various settings and deployment information. See Writing the config.xml File on the official developer site.
  • widget.info, a very small file with a few lines used to define the opacity of the application's body. This may not be required for full-screen applications.
  • index.html, the main HTML file for your application.
  • Images, sounds and other resources.

You can write these files using your favourite editor. I'm happily using vim with linting plugins for my JS and CSS.

Testing

As of version 4.0 of the SDK, a Linux version of the emulator is now available. This allows you to test your apps as they would appear on 2011-2013 TVs. For older TVs, you can run SDK 1.5's emulator in Wine, but emulators belonging to SDK 2.0 and newer will not run.

It is possible to run the emulators in a Windows virtual machine, and, with a little bit of trickery, you can make the emulators use your own application folder to look for apps. This involves sharing your development folders with your virtual machine, then creating a symbolic link to those folders, replacing the "apps" folder inside the SDK's installation directory. A quick overview of this process is available in an article titled, Your Windows IDE sucks? Replace it with Your Favorite Editor on the Mac!

Deployment

Samsung Smart TVs have a built-in developer account that allows you to send an application over from your computer for live testing on the television itself. You enter the IP address of your deployment server and the TV will look for a file called widgetlist.xml on that server. An example of the format is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok">
<list>
<widget id="MyTVApp">
<title>MyTVApp</title>
<compression size="3383543" type="zip"/>
<description>A basic application for Samsung TVs</description>
<download>http://192.168.1.83/Widget/MyTVApp_0.1_America_20120709.zip</download>
</widget>
</list>
</rsp>

After that, it will download each app listed using the URL in the <download> tag. All you have to do is zip up the files, modify the widgetlist.xml accordingly and make sure both files are hosted in a web server running on your machine. You can use Apache, lighttpd or anything. I have a small node.js/connect app that will build the widgetlist.xml dynamically based on the zip files I have in a directory labelled deploy.

So there you have it. Development of Samsung Smart TV apps is not impossible without Windows. In fact, there's quite a few options available. Hooray!

Package a Samsung Smart TV app without the Samsung IDE or Eclipse plugin?

They are just zip files containing the application, so long as you put the right files inside (which you can see examples of in the IDE's display, or by unzipping a package created with the IDE) there is no obvious reason that you would need to use the IDE.

Samsung SDK: how to install app through apache server and view logs in console?

Please go through this post, It has answer to your query although in title it is mentioned for linux, But please read whole answer as it contains all the info and can be useful to you

How to build & deploy a Samsung SmartTV app without the IDE (e.g: on Linux)

How to get Samsung Smart TV Emulator to see my app?

Unzip your app in the app folder it should look like this

Samsung TV SDK 4\apps\yourapp\index.html

Samsung TV SDK 4\apps\yourapp\config.xml

Samsung TV SDK 4\apps\yourapp\other files and folders

Samsung Smart TV - upload application on tv for testing

I haven't found how to package app using eclipse but I used this solution https://stackoverflow.com/a/13840964/2069368 and it works. All I've done was to zip application, put it in apache www dir and create widgetlist.xml.

Creating a single SmartTV app for multiple platforms of Samsung and LG

Cross platform development on Smart TV it is a little tricky. I would suggest you to have a look at some cross platform SDK already out there.

Here a brief list:

INIO TV from Mautilus Software

http://www.inio.tv

Source code free and open source at
https://github.com/mautilus/inio-sdk-js

I used in the past, it works well for Samsung and LG.

Tv App Engine

http://www.tvappagency.com

I think it is proprietary and I could not find information about their fees.

Joshfire Smart TV SDK

http://framework.joshfire.com/

I had not opportunity to test it yet but it seems LG is not supported.

I hope it can helps.

Samsung SmartTV emulator from eclipse

FYI, no emulator available on mac version now. Samsung claims that they will support soon.

At this stage, only window machine supports emulator.

To use emulator on window, you need the following steps which are missing on mac.

  1. Open the connection explorer
  2. Turn on the emulator manager
  3. Create a emulator and then open.
  4. Right click the project and Run as the emulator

PS. emulator is different from simulator. I will say simulator is more likely a browser, it doesn't look like TV and not reliable.

How to deploy AIR files to Samsung TV with SmartTV

I figured out that you have to do following steps in order to get your AIR app running:

  • Create your AIR project with air version 2.6
  • Compile and pack your AIR applications as an .airi file
  • Unzip the .airi file
  • Add a config.xml with your desired configuration to the unzipped folders
  • Make sure the config.xml has these settings

    <flashplayer>y</flashplayer>
    <apptype>13</apptype>
  • Zip up the files again and deploy via
    local server as documented in the
    Samsung documentation


Related Topics



Leave a reply



Submit