How to Create Multi Package App in Tizen

How to Create Multi Package App in Tizen

BY Nawab Ahmad Reshi 2020년 04월 29일 Tizen Studio

Introduction

Currently, more than 130+ million Tizen-based devices such as TVs, watches, Family-Hubs, IoT based home appliances, and so on are commercialized. Tizen ecosystem provides convenient development tools to meet all your development needs. Tizen Studio supports web application development using HTML, JS, CSS, and Native application development using C Language.

Tizen Studio not only guarantees compatibility with existing applications but also respond to the enhanced demands of new emerging platform applications. Tizen studio provides required tools to manage your application life cycle and ensures that you have everything needed to aid your application development needs by providing various options to add new features, enhance the existing functionality by creating a new app on top of the existing app with multiple package phenomenon This blog explores possibilities to help you get started with developing multi package applications.

What You Will Build?

You will set up a basic UI project with a widget project as package that is dependent on UI application:

                                            

What you need?

You need the following setup on your development hardware:

  • Operating System

    • Windows 8 or later
    • Mac OS High Sierra or later
  • Tizen Studio (latest version)

If you have set up the required software on your development hardware, let us get started with developing a basic multi package app. You can build on this basic app and develop a more complex multi package app.

Background

The basic objective of creating a multi package app is to create an application that fulfils the following use cases:

  • The application works across multiple versions of the Tizen platform.
  • App takes advantage of new features on new devices, without sacrificing backward compatibility.
  • As the app gets bigger, it becomes important to break it into separate modules, such that you can enjoy parallel compilation.
  • App can be divided based on features and take modular design where each feature is a separate app.   

It seems at the very inception that multiple TPK support is the best solution, but this not true in every case. It has its drawbacks too; you must analyse your design aptly with the linked resources and determine that multiple TPK is the right choice for your application. For more information, see developing multiple packages as a Tizen app.

Multi Package App Structure

The multi package app has the following basic structure:

  • The Main App module ideally should be used only by continuous integration software in order to build, test and deploy the final TPK and very rarely, when you need to test cross-feature flows.
  • The other app can be a feature, supporting feature, or customized as per the requirements, it is mostly dependent on the main app.

                                                     

Procedure

You can create a new Tizen project using the provided templates and samples, and the available configuration settings. 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.

Let us create a basic multi package app with a wearable profile and UI template:

Step 1. Create a Basic UI App

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

    1. In the Tizen Studio menu, click File > New > Tizen Project.
    2. In the Tizen Studio toolbar, click New .
    3. Right-click in the Project Explorer view and select New > Tizen Project.
    4. If there is no project in the workspace, in the Project Explorer view, click Create new project .
  2. In the New Tizen Project window, select the project type as Template and click Next.
    1. The Template option provides a list of templates with a basic structure where you can start the application project.
  3. Select wearable profile and version from the drop-down list and click Next.
    1. The available versions depend on the platform version you have installed and are using to develop the application.
  4. Select the Web Application as application type and click Next.
  5. Select Basic UI template and click Next.
    1. The Tizen Project Wizard creates the project based on the selected template or sample.
  6. Define the project properties and click Finish.
    1. You can enter the project name and the unique package ID. You can also select the location and working sets by clicking More properties.

You will get a basic UI app created with all the default and required files and folder in project explorer.

Step 2. Create Widget App

  1. Follow the steps A-D as mentioned in Step 1.
  2. Select Widget template and click Next.
    1. The Tizen Project Wizard creates the project based on the selected template or sample.
  3. Define the project properties and click Finish.
    1. You will get a Widget app created with all the default and required files and folder in project explorer.

Note:

  • You can enter the project name and the unique package ID. You can also select the location and working sets by clicking More properties.
  • You must take note that 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-z A-Z] [a-z A-Z 0-9-]{2,49}.
  • The options that you can set are listed in the following table:

 

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 in a specific working set, select a working set .

Step 3. Establish Reference or Dependency  

 To establish a project reference between a UI application and a widget application such that you create a multi package app which has a dependency between them:

  1. In Project Explorer view, right-click the UI application.
  2. Select Properties > Tizen Studio > Package > Multi.
  3. Select the check box for the widget application and click OK.
  4. In the Project Explorer view, a message (with the UI application) appears next to the referenced project name for all the applications you have added to the package.

Step 4. Build and Run

  1. Build and run the UI application.
    The widget application is built automatically while the UI application is built and run.

Following the mentioned procedure chronologically ensures that you create a basic multi pack app. You can build more complex multi-apps and package multiple apps in one TPK as per your requirement and use case. It is imperative that Tizen Studio provides flexibility and options for all most all the use cases.  If you want to build more predictable applications by composing functions and assembling components where each piece has its own responsibility, this ultimate modular paradigm is achieved by multi packaging. IfTizen Studio doesn’t support a service app template for web application.

Written by Nawab Ahmad Reshi
Keep Reading All Posts
Read More
Read More
Read More