Today I have two good news to share.  First is launch of new developer site (http://developer.lge.com) that covers both LG smart TV and mobile phones.

It’s really nice and improved.  My favorite part is online documentation, http://developer.lge.com/resource/tv/RetrieveDocDevLibrary.dev, which is so easy to search and navigate.  I strongly suggest to check it out yourself.

Another news is SDK v2.2.0 has released.  You can find detailed information here, but major addition is now you can use Mac and Linux as well as Windows to develop applications for LG Smart TV.  Also both 32 and 64 bits are covered.  So hopefully you are as much excited about this as I am.

Happy coding!

Jae Jo



By all means the SDK for LG Smart TV is about TV.  What’s unique about TV compared to other devices is that you can create applications related to broadcasting.  What I meant by broadcasting is clear QAM signal that TV receives via a coaxial cable.  You don’t really need to know what QAM is though. ^^

The API’s about broadcasting have existed since SDK v2.0 (current is v2.1 and v2.2 is coming soon).  Besides changing channel up and down, you can get detailed information about the current channel including number, title, start/end time, description, and more.  So today I would like to talk about how to make your own applications using these broadcasting API’s.

=== Preparation ===

You can find “[Basic] Web App Development Quick Start Guide (WebAppSample_Broadcast)” that includes both sample code (WebAppSample_Broadcast.zip) and documentation (Web App Development Quick Start Guide (WebAppSample_Broadcast).pdf) on the LG developer lounge, here.

=== Application using broadcasting API ===

The documentation, Web App Development Quick Start Guide (WebAppSample_Broadcast).pdf, describes detailed steps to create an eclipse project with the sample source code, so I’m not going to repeat the same steps here.

Once you have eclipse project setup (I kept the same project name “WebAppSample_Broadcast”, it should look like the image below.  You should have the following files under “WebContent” directory.

1) index.html

2) css/main.css

3) js/keycode.js, js/main.js

broadcast API eclipse project

Now you can run this with the emulator for LG Smart TV.  There are three buttons on the upper right corner; channel up, channel down, and get channel info.  And there are five attributes below that.  Size of area where TV shows up is 800 by 600, and you can find this in css/main.css.

I tried to run the same code on a real TV, and the screen looked like below.  Notice that I clicked “Get Channel Info” button and the attributes below now have real data such as channel name, program title, and start time.  As you might have noticed, the TV information shown below came from San Jose, CA (USA) where I tested this.

broadcast API - on real TV

Life wouldn’t be fun without changes, so I added some more code to get channel number object and tried to display major and minor channel number as one of the attributes.

broadcast API - on real TV with channel number

I made the following changes in js/main.js, which is getting the channel number object and reading the major and minor number information.

// get channel information
function channelInfo()
// +++ Jae’s addition
var channelNumber = broadcast.getCurrentChannelNumber();
var channelNumberMajor = channelNumber.majorNum;
var channelNumberMinor = channelNumber.minorNum;
// — Jae’s addition

// +++ Jae’s addition
document.getElementById(“channel_number_major”).innerHTML= channelNumberMajor;
document.getElementById(“channel_number_minor”).innerHTML= channelNumberMinor;
// — Jae’s addition


// delete channel information
function delete_channelInfo(){
// +++ Jae’s addition
document.getElementById(“channel_number_major”).innerHTML = “”;
document.getElementById(“channel_number_minor”).innerHTML = “”;
// — Jae’s addition


Happy coding!

Jae Jo


Is everyone enjoying summer?  I am ^-^.  Just to let you know that I haven’t forgotten about this blog.  I plan to add more post soon so stay tuned.

Jae Jo

Last time (hello world sample web app, June 01) I showed how to make a simple “hello world” same web app using Apache web server.

Today I’m going to talk about doing the same with Tomcat server with Eclipse plugin from LG.  If you had a chance to look at document from LG developer lounge, http://developer.lgappstv.com, you probably have noticed that all document assume that you are using Eclipse plugin from LG with Tomcat.  I know this is not the case with some of you, but I thought it’d be helpful to explain development environment that most document from LG developer lounge describes.

I’d appreciate if you add your comment on your favorite development environment when developing web apps.

=== Summary ===

Use Import from sample LG projects when creating your new project with Eclipse and Tomcat environment, and modify as you need.  It just works! ^-^

=== Installation ===

Prerequisite: As I described in my previous blog (hello world sample web app, June 01), the followings should be installed already.

1) JDK for Java SE 6 from here

2) “Eclipse IDE for Java EE Developers” from from here

3) SDK for LG Smart TV from http://developer.lgappstv.com

4) Apache Tomcat from here

5) Eclipse plugin for LG Smart TV

=== Hello world web app with Tomcat ===

Details on how to develop web application described in lg web application development with lg smart tv sdk.pdf, which you can get from the LG developer lounge, Home->Document->Development Guidelines.

There are three ways to create LG project from Eclipse.

1) blank project

2) blank project, then import LG template

3) import from sample LG projects

I suggest 3) unless you feel very comfortable with Tomcat.  2) is okay but you need to add index.html to run it.  I will cover 1) and 2) in my next blog.

Now I’m going to show you how to do “hello world” web app using 3).

A) First add a new LG project from the menu of Eclipse.

new LG project menu

B) Select “Create Project From Sample Project” from Contents.  Then I chose “PhotoApplicationReferenceCodeV1003” from the sample list.

new LG project from sample projects with list

C) From “Import Project” dialog, root directory and project should be selected already.  Make sure and check “Enable Server Control Functionality” at the bottom.  This would allow controlling Tomcat server from the project.

new LG project menu - import photo project

D) Now “New Server” dialog would popup to define a new server.  All the selections were already made for me for Tomcat v7.0, so click “Next”.

new LG project menu - new server

E) All the projects are listed on the left side “Available”.  Select “PhotoApplicationReferenceCodeV1003” from the left side and click “Add”.

new LG project menu - add project to server 1

F) The “PhotoApplicationReferenceCodeV1003” should show up on the right side as “Configured:”.

new LG project menu - add project to server 2

G) The new project should show up under Project Explorer on the left pane of Eclipse.

project pane

H) Now it’s time to run for a quick test.  Go and click “LG Command –> Launch Emulator” menu.

run project

I) Then select a project to run, “PhotoApplicationReferenceCodeV1003” in this case.

select a project to run

J) Emulator would start and a screen like below should show up.  Note I started using SDK v2.1 as I posted before (SDK v2.1 released), so the screen shot below came from the VirtualBox-based emulator.

emulator output

K) So far so good.  This sample photo app runs fine, but it is “hello world” that I am trying to run.  So let’s modify this sample project.  The only thing you need to modify is “index.html” like below.

change index html

Index.html after changes

<!–DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”&gt;
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
<title>LG Browser Sample</title>
<br><h1>Hello world!</h1>

L) Then run it again by repeating steps H) and I) to see hello world.  Here I’d like to show another way to run the web app within Eclipse.  Right click “PhtoApplicationReferenceCodeV1003” project and select “Run As –> 1 Run on Server”.

run hellow world on server

M) Finally here is hello world within Eclipse.

hello world with server

Happy coding!

Jae Jo

SDK v2.1.0 was released June 19, 2012.  You can check out details in the developer lounge (http://developer.lgappstv.com), but here are my highlights.

1. Started using VirtualBox-based emulator.  This is the first step to provide multiple OS development environment I think.  I installed this new version and tried the emulator.  Dang it’s faster than the previous windows-based version.  Good job!

2. More API’s were added related to broadcast and voice.  I’m going to try them out and let you know in my future blog.  Thanks.

Jae Jo

Smart TVs is a hot topic these days, but the conversation is peppered with  a lot of stale data. We’ve been shipping our LG NetCast smart TVs over the last two years and wanted to take some time to debunk some of the more prevalent myths with data.

Smart TV Infographic from LG

Ok I admit that I like “hello world”.  It’s usually the first thing you run into when you start developing with a new programming language or environment.

So today’s topic is how to show “hello world” in a web application using the emulator bundled with SDK for LG Smart TV.  Currently I’m using Windows7 as my development system and I’m going to start from scratch.

=== Installation ===

1) First I installed JDK for Java SE 6 from here.  Minimum requirement is JRE for Java SE 6, but I chose JDK for possible Java development. ^-^

2) JRE/JDK is a prerequisite for Eclipse.  SDK provides Eclipse plugin for web app development.  So I installed “Eclipse IDE for Java EE Developers”, which I downloaded from here.  I’m not going to use Eclipse for this post but installed it because I will use it later.

3) Now it’s time install SDK for LG Smart TV.  First I downloaded SDK for LG Smart TV from LG developer lounge, http://developer.lgappstv.com.

  • You’ll need to sign up (upper right corner) first, sign in with your login/password, and click “SDK download” icon at upper left corner.  I suggest to get the latest version, v2.0.1.
  • SDK has development environment for both web and Adobe flash.  I’m going to only cover web side unless there are lots of requests to discuss flash development.
  • Details about installation is described in lg smart tv sdk v2.0.1 installation guide.pdf, which you can get from the LG developer lounge, Home->Document->Development Guidelines.

4) Now I need to choose a web server that I can use.  You can skip this step if you have one already.  Since I don’t have one, I installed Apache web server from here.

=== Hello world web app ===

Now it’s time to have some fun.  Let’s show “hello world” on the emulator from SDK.

1) I modified “index.html” for the Apache web server I installed previously to show “hello world” like below.  The index.html existed at C:\Program Files\Apache Software Foundation\Apache2.2\htdocs in my case.  I confirmed my local web server is running correctly by typing “localhost” from my web browser.


<br><h1>Hello world!</h1>


2) Then I started the emulator for LG NetCast 3.0 by clicking the icon named “LG DTV Emulator NetCast 3.0 (2012)” in my desktop.  The icon looks like the following.  Or you can go to windows menu to launch it as well, All Programs->LG Smart TV SDK->Emulator->LG DTV Emulator NetCast 3.0 (2012).

LG TV emulator for NetCast 3.0 (2012)

3) You will see a black TV screen with a remote control on the right side.  First click the power button (upper left corner of remote control) to turn on the TV.

LG emulator screen shot

4) Then click “DTV Emulator” located at upper left corner of the TV screen, and select “Run Browser (Open URL)…” menu.

5) When “Open URL” dialog popped up, I selected “http://localhost&#8221; (or you can type) and hit “GO” button.

Run Browser (Open URL) dialog

6) Then the magic happened.  “Hello world!” finally showed up.

Hello world!



Welcome to LG Smart TV blog!

My name is Jae (pronounced like “Jay”), and I’m starting a new blog here to discuss LG Smart TV.  Yes I currently work for LG Electronics USA, Inc. in San Jose office.  This blog will mainly focus on what you can do as a developer/partner for LG Smart TV.  Since there is already a developer lounge (http://developer.lgappstv.com) that has details about how to develop applications for LG Smart TV, I will blog additional information that may benefit developers.  Also I will occasionally write business-related topics.

Any comments would be welcomed.  You may even suggest what you want to hear about LG Smart TV.  I will try my best to cover topics that you are interested in.  Thank you and happy blogging!

Jae Jo


%d bloggers like this: