top

TV Device

This topic describes how to test your Web application by running or debugging it on a TV.

If you have tested your application on the emulator, it is ready for uploading and testing on a TV. Even though it is possible to complete most application testing on the emulator, it is highly recommended that you also test your application on a target device. The emulator and the TV environments are very similar, but there are some differences at the hardware level.

Prerequisites

To test your application on a TV:

Connecting the TV and SDK

To connect the TV to the SDK as a remote device:

  1. Enable Developer Mode on the TV:
    a. On the TV, open the "Smart Hub".
    b. Select the "Apps" panel.

    Figure 1. Apps panel location

    Figure 1. Apps panel location


    c. In the "Apps" panel, enter "12345" using the remote control or the on-screen number keypad.
    The developer mode configuration popup appears.
    Figure 2. Developer mode configuration

    Figure 2. Developer mode configuration


    d. Switch "Developer mode" to "On".
    e. Enter the IP address of the computer that you want to connect to the TV, and click "OK".
    f. Reboot the TV.
    Figure 3. Reboot popup

    Figure 3. Reboot popup


    When you open the "Apps" panel after the reboot, "Developer Mode" is marked at the top of the screen.
    Figure 4. Developer mode enabled

    Figure 4. Developer mode enabled

  2. Connect the TV to the SDK:
    a. Launch "Device Manager" by selecting Tools->Device Manager.

    Device Manager

    Device Manager


    b. Launch Rmote Device manager and click on + to add TV.
    Remote Device Manager

    Remote Device Manager


    c. In "Add Device" dialog, add a name and IP address of the TV. Click on Add.
    Add Device Dialog

    Add Device Dialog


    d. Select the TV from the list in device manager and connect it using switch in connection column
    enter image description here

    enter image description here


    Now you can launch applications on the TV directly from the Tizen Studio.

Launching Applications on the TV

You can launch your application on the target device in normal or debug mode:

  • To launch the application in normal mode, right-click the project in the "Project Explorer" view, and select "Run As" and a specific launch mode:

    • "Tizen Web Application": Run the application on the connected device.
    • "Tizen Web Unit Test Application": Run the application with unit tests.
  • To launch the application in debug mode, right-click the project in the "Project Explorer" view, and select "Debug As > Tizen Web Application".
    The JavaScript Debugger runs automatically when you launch the application in debug mode. It is based on the WebKit Web Inspector, and has been modified to support remote debugging.

    Figure 11. JavaScript Debugger

    Figure 11. JavaScript Debugger

Troubleshooting

The following are common issues you can encounter when working with an application on the TV:

  • Error codes

    • "1009 : App uninstall fail"
      The application cannot be uninstalled through the IDE due to internal device problems.
      Uninstall the application from the "Apps" panel on the TV.
    • "1010 : App install fail"
      Application installation can fail for many reasons. A problem with the signing certificates is a common reason.
      Check your certificates and try again.
    • "1013 : App run fail"
      The application cannot be launched through the IDE due to internal device problems.
      Try to run the application again, or reboot the device.
  • "You are not an authorized user!" error and "Null Pointer" error (NPE)

    • These error messages occur if you are using older versions of the device firmware or SDK. Make sure you are using the newest firmware and SDK versions.
  • "Failed to get a device information" message

    • This message occurs only on 2015 devices, and has no effect on running the application. You can ignore the message.
  • On a macOS computer, the IDE freezes or hangs

    • Update your Java Development Kit installation.

Frequently Asked Questions

  • When I install a newer version of an application on the TV, is the previous version overwritten or uninstalled?

    • The previous version of the application will uninstall automatically when you install the new version.
  • Can applications or widgets be installed on the TV through USB?

    • For security reasons, installing applications or widgets through USB is no longer supported.
  • Why do some applications run perfectly on Web Simulator but fail to run on the TV or the emulator?

    • The Web engine of the Web simulator is different than that of the TV and the emulator. Therefore, application behavior can vary between Web simulator, TV, and emulator. Make sure you perform the final testing of your application on the emulator and TV.
  • How do I open port 26101?

    • Port 26101 is an internal device port. It cannot be opened separately.