Sample App Overview

The LG QRemote SDK provides a sample application which makes use of the LG QRemote APIs for getting the list of configured devices, IR learning and sending IR(infrared) signals to those devices.


Please check the Supported Device list of LG QRemote SDK.

Applications developed using the LG QRemote SDK work only on the LG smartphone in Supported Devices.


Introduction to the Sample Application

When the sample application is first loaded, you will see the screen like Figure 1(a).



Figure 1. Screens of the Sample Application


The sample application consists of the following UI components:

Device list: It shows only the name of the selected device. You can see the list of all devices and select other one from the list by tapping on it.

Function list: It shows only the name of the selected IR function that is supported by the selected device. You can see the list of all IR functions and select other one by tapping on it.

Test button: It is for testing the selected IR function. You can send an IR(infrared) signal to the device by tapping it. The result of the test will be shown in the Log TextView in the bottom of screen.

Clear button: It is for clearing the Log TextView.

Devices button: It is for getting the list of configured devices. The result will be shown in the Log TextView.

Function buttons: The example of buttons mapped with supported IR functions of the selected device.

Log TextView: It shows the result messages of actions.

Sending a raw IR data button: It sends IR signals with raw IR data. The raw IR data for powering on/off the LG TV is hard-coded.

Sending a learned IR data button: It sends IR signals for the latest learned IR data. It does nothing if the application has never learned.

Learning buttons: These buttons opens windows for testing the learning feature. The ‘learn selected device’ button will add a learned IR data to the selected device, and the ‘create device’ button will create a new device and add a learned IR data to that device.

‘Sending raw IR data button’ and ‘Learning buttons’ only work on some LG smartphones. See Supported Devices for detailed information.


As shown as Figure 1(b), the sample application provides two context menus:

Add device: This menu starts the process to configure and add devices.

Delete device: This menu starts the process to delete the selected device from the list.


The sample application opens windows for IR learning as Figure 2, when you click the learning buttons.


Figure 2. Window for IR learning


This window has the following UI components:

Start learning button: This button starts a learning process.

Function list: It shows all of the IR functions supported by the selected device. It will be updated when you add the learned IR data to the device.


When you click the ‘Learn’ button, Figure 4(a) shows up. Send IR signals in order for your smartphone to learn the IR data. Figure 3 shows the instructions for IR learning.


Figure 3. Instructions for IR learning


If your smartphone learns the IR data successfully, the new IR function with the learned IR data will be shown in the IR function list as Figure 4(b).


Figure 4. IR learning screens


Importing the Sample Application

In order to execute the sample application, you should follow the steps below. Please make sure that you have LG QRemote installed on your target device. For more information about constraints of the LG QRemote SDK, please refer to the Introduction.


1. Start Eclipse.


2. Select File > New > Project.



3. Select Android > Android Project from Existing Code, and click Next.



4. Click Browse… and select the directory you installed the LG QRemote SDK.

If you downloaded the LG QRemote SDK by Android SDK Manager or copied it manually to the recommended directory,

the path of the LG QRemote SDK is:

{installation directory of your android-sdk}/extras/ LG/QRemote


5. Check the ‘Copy projects into workspace’ box and click Finish.



6. The project named ‘QRemoteSDK_Sample’ will appear in the project explorer.



The sample project is now ready to run.