top

Creating TV Applications

This topic describes how to create a new Tizen project in the Tizen Studio. It also describes how to import existing projects to the Tizen Studio.

You can create a new Tizen project using the provided templates and samples, and the available configuration settings. You can also import existing Tizen projects to Tizen Studio by selecting the root directory or loading an archive file.

Creating a Project

To create a new TV Web project, use the Tizen Project Wizard, which is a Tizen Studio tool.

The Tizen Studio provides various project templates and samples that make it easier for you to start coding your application. When you create a new project, you can select a specific template, which the Tizen Project Wizard uses to automatically create basic functionalities for the application. The default project files and folders are also created.

In the Tizen Project Wizard, you can select a profile and version, application type, and template or sample to create the project. In addition, you can set basic project properties, such as the project name, location, and working sets.

To create a new TV Web application:

  1. To launch the Tizen Project Wizard, use one of the following:

    • In the Tizen Studio menu, select “File > New > Tizen Project”.
    • In the Tizen Studio toolbar, click “New” (New icon).
    • Right-click in the “Project Explorer” view, and select “New > Tizen Project”.
    • If there is no project in the workspace, click “Create new project” (New icon) in the “Project Explorer” view.
  2. In the “Tizen Project Wizard”, select the project type and click “Next”.

    Figure 1. Select project type

    Figure 1. Select project type

    The “Template” option provides a list of templates with a basic structure where you can start the Web application project:

    • Basic Project: Template project for a simple Tizen application that you can launch. The “main.js” file in this template includes a keycode handling template for handling remote controller keys. This template is recommended as a general-purpose template.
    • Caph3.0-Empty Template for AngularJS/jQuery: Template projects based on CAPH 3.0. CAPH is a Web UI framework for TV that lets you develop high-performance Web applications easily and quickly. For more information, see CAPH.
    • Empty: Template project containing an empty “main.js” file, basic “icon.png” and “config.xml” files, and an empty “index.html” file. This template is recommended when you want to develop an application from scratch.
    • jQuery MasterDetail/MultiPage/Navigation/SinglePage: Template projects for developing multiple page and single page applications based on jQuery Mobile.

    The “Sample” option provides a list of sample applications demonstrating various examples of API usage and UI design.

  3. Select the profile (“TV”) and version from the drop-down list and click “Next”.
    The version depends on the platform version you have installed and with which you are developing the application.

    Figure 2. Select profile and version

    Figure 2. Select profile and version

  4. Select the “Web Application” application type and click “Next”.

    Figure 3. Select application type

    Figure 3. Select application type

  5. Select a template or sample, and click “Next”.
    The Tizen Project Wizard creates the project based on the selected template or sample.

    Figure 4. Select template

    Figure 4. Select template

  6. Define the project properties and click “Finish”.
    You can enter the project name and the unique package ID. You can also select the location and working sets by clicking “More properties”.

Note

The Tizen API names cannot be used as project names. The project name is case-insensitive and is restricted to the following regular expression: [a-zA-Z][a-zA-Z0-9-]{2,49}.

Figure 5. Define project properties

Figure 5. Define project properties

The options you can set are listed in the following table.

Table 1. Project properties
Property Description
Project name A name for the project to be created.
Use default location If you check this option, the project is created in the “$<workspace_location>/<project_name>” directory.
Location Manually select the location of the project.
If you check the “Use default location” checkbox, this option is disabled.
Working sets If you want to include the project to a specific working set, select a working set .

Managing the Application Configuration

All application configuration settings are made inside the “config.xml” file. It contains information about the application, such as required device features and platform version, application icons, application ID and package name.

For more information on configuring the application, see Setting TV Application Configuration.

Importing an Existing Project

To import an existing project:

  1. In the Tizen Studio menu, go to “File > Import”.
    The “Import Wizard” opens.

  2. Select “Tizen > Tizen Project” as the import source, and click “Next”.

    Figure 6. Select import source

    Figure 6. Select import source

  3. Select whether to import from a root directory or archive file, and click “Browse”.

    Figure 7. Import from directory or file

    Figure 7. Import from directory or file

  4. Select the root directory of your application project, or select the “.wgt” archive file, and click “OK”.

    Figure 8. Select root directory

    Figure 8. Select root directory

  5. Click “Next”.
    The names of the Tizen projects in the selected folder or archive appear in the “Project list” table.

  6. Define the profile and version for the projects you want to import.

    Figure 9. Select profile and version

    Figure 9. Select profile and version

    Note

    If a "Not installed profile" or "Not installed version" message appears next to a TV application project that you want to import, select a Tizen TV profile ("tv" or "tv-samsung") and version "3.0" from the "Profile" and "Version" drop-down menus for the project.

    Figure 10. Not installed version message

    Figure 10. Not installed version message

    Selecting the Tizen TV 3.0 profile does not change the value of required_version in the application’s “config.xml” file. If you want to change required_version, you can change it later using the Tizen Configuration Editor.

    If you want your application to be compatible with all Tizen TV devices released since 2015, required_version must be set to “2.3”.

    Figure 11. Required version in the Tizen Configuration Editor

    Figure 11. Required version in the Tizen Configuration Editor


    Figure 12. Required version in "config.xml"

    Figure 12. Required version in “config.xml”

  7. Select the check boxes for the projects you want to import, and click “Finish”.

    Figure 13. Finish import

    Figure 13. Finish import

    The selected projects are imported to your workspace.

    Figure 14. Imported projects

    Figure 14. Imported projects