1 94 Tizen SDK App Development Sungkyunkwan University

  • Slides: 67
Download presentation
1 94 Tizen SDK & App Development Sungkyunkwan University Embedded Software Lab. @ SKKU

1 94 Tizen SDK & App Development Sungkyunkwan University Embedded Software Lab. @ SKKU

Contents • 2 94 Tizen SDK – Installing Tizen SDK – Introduction to SDK

Contents • 2 94 Tizen SDK – Installing Tizen SDK – Introduction to SDK • Native/Web application – Sample applications & Web coding – Application Development • • • [Native/Web] Hello Tizen [Web] HTML 5 Features (web page link, multimedia support) [Native] To do list Embedded Software Lab. @ SKKU

3 94 Installing. Tizen SDK for Windows Embedded Software Lab. @ SKKU

3 94 Installing. Tizen SDK for Windows Embedded Software Lab. @ SKKU

Installing Tizen SDK (Windows) • 4 Tizen IDE & SDK image download – https:

Installing Tizen SDK (Windows) • 4 Tizen IDE & SDK image download – https: //developer. tizen. org/development/tools/download? langswitch=en • Tizen SDK Contents – IDE(Integrated Development Environment) • • – – • Eclipse IDE based Tizen-specific development tool add-on Emulator Toolchain Sample code Documentation Tizen SDK Install instruction – https: //developer. tizen. org/development/tools/download/installing-sdk? langredirect=1 • Tizen 2. 3 Release Notes – https: //developer. tizen. org/development/tools/download/release-notes/tizen-sdk/2. 3 -rev 3 -jul -6 -2015 Embedded Software Lab. @ SKKU 94

Installing Tizen SDK (Windows) 5 • System Requirements – OS • Ubuntu® 12. 04

Installing Tizen SDK (Windows) 5 • System Requirements – OS • Ubuntu® 12. 04 or 12. 10 (32 - or 64 -bit) • Microsoft Windows® XP (32 -bit) Service Pack 2 or later, Microsoft Windows® 7 (32 - or 64 -bit) • Apple Mac OS® X 10. 7 Lion (64 -bit), or Apple Mac OS® X 10. 8 Mountain Lion (64 -bit) – – – Dual core 2 GHz CPU 2 GB RAM memory 6 GB storage Local Administrative Privileges JRE(Java Runtime Environment) v 6 • http: //www. oracle. com/technetwork/javase/downloads/index. html • List of available graphic cards and webcams – https: //developer. tizen. org/development/tools/download/installingsdk/prerequisites? langswitch=en Embedded Software Lab. @ SKKU 94

Installing Tizen SDK (Windows) • Installation – Using networks • Using the SDK install

Installing Tizen SDK (Windows) • Installation – Using networks • Using the SDK install manager, download necessary data through the network – SDK image installation • Install SDK using full SDK image(including all necessary data) through the SDK install manager • Versions of SDK – Tizen 2. 3 SDK • Application development tool for Tizen based smartphone – Tizen SDK for Wearable 1. 0. 0 • Application development tool for Samsung galaxy gear • http: //developer. samsung. com/samsung-gear Embedded Software Lab. @ SKKU 6 94

Installing Tizen SDK (Windows) 7 • Download specific version of install manager and SDK

Installing Tizen SDK (Windows) 7 • Download specific version of install manager and SDK image according to development environment Embedded Software Lab. @ SKKU 94

Installing Tizen SDK (Windows) • Steps of SDK installation Embedded Software Lab. @ SKKU

Installing Tizen SDK (Windows) • Steps of SDK installation Embedded Software Lab. @ SKKU 8 94

Installing Tizen SDK (Windows) 9 • You can designate the path of package and

Installing Tizen SDK (Windows) 9 • You can designate the path of package and pre-downloaded image in advanced option Embedded Software Lab. @ SKKU 94

Installing Tizen SDK (Windows) 10 • Intel HAXM(Hardware Accelerated Execution Manager) – Hardware emulation

Installing Tizen SDK (Windows) 10 • Intel HAXM(Hardware Accelerated Execution Manager) – Hardware emulation engine using ‘Intel virtualization technology(VT)’ – Support fast emulation with Tizen x 86 emulator image and SDK Embedded Software Lab. @ SKKU 94

Installing Tizen SDK (Windows) • Complete installation and run Tizen IDE – Starts >

Installing Tizen SDK (Windows) • Complete installation and run Tizen IDE – Starts > Tizen SDK > Tizen IDE Embedded Software Lab. @ SKKU 11 94

Installing Tizen SDK (Windows) • Set the path of working directory and run Tizen

Installing Tizen SDK (Windows) • Set the path of working directory and run Tizen SDK Embedded Software Lab. @ SKKU 12 94

Installing Tizen SDK (Windows) • Main screen Embedded Software Lab. @ SKKU 13 94

Installing Tizen SDK (Windows) • Main screen Embedded Software Lab. @ SKKU 13 94

Installing Tizen SDK (Windows) • Execute simulator – Run As Tizen Web Simulator Application

Installing Tizen SDK (Windows) • Execute simulator – Run As Tizen Web Simulator Application – Available to change html page and composition of device-like screen using several panels Embedded Software Lab. @ SKKU 14 94

Installing Tizen SDK (Windows) • Emulator Execute simulator – Run As Tizen Web Application

Installing Tizen SDK (Windows) • Emulator Execute simulator – Run As Tizen Web Application – or, execute Emulator Manager in Connection Explorer Emulator Manager Target Emulator Environment setup Emulator screen & FS Explore Embedded Software Lab. @ SKKU 15 94

Installing Tizen SDK (Windows) • Event Injector – Generate Events in Tizen emulator –

Installing Tizen SDK (Windows) • Event Injector – Generate Events in Tizen emulator – Telephony, Sensor, NFC, Location etc. Embedded Software Lab. @ SKKU 16 94

17 94 Installing. Tizen SDK for Linux Embedded Software Lab. @ SKKU

17 94 Installing. Tizen SDK for Linux Embedded Software Lab. @ SKKU

Installing Tizen SDK (Linux) • System requirements – – • Ubuntu® 12. 04 or

Installing Tizen SDK (Linux) • System requirements – – • Ubuntu® 12. 04 or 12. 10 (32 - or 64 -bit) Dual core with 2 GHz CPU Minimum 2 GB RAM Memory Minimum 6 GB free disk space Install upper version of Oracle ® Java* v 6 – Install Oracle® Java 7 Embedded Software Lab. @ SKKU 18 94

Installing Tizen SDK (Linux) • Install necessary packages • Install manager download Embedded Software

Installing Tizen SDK (Linux) • Install necessary packages • Install manager download Embedded Software Lab. @ SKKU 19 94

Installing Tizen SDK (Linux) • Change mode to execute the install manager – $chmod

Installing Tizen SDK (Linux) • Change mode to execute the install manager – $chmod +x tizen-sdk_2. 3. 63_ubuntu-64. bin • Install manager execution –. /tizen-sdk_2. 3. 63_ubuntu-64. bin Embedded Software Lab. @ SKKU 20 94

Installing Tizen SDK (Linux) • Using Install manager Embedded Software Lab. @ SKKU 21

Installing Tizen SDK (Linux) • Using Install manager Embedded Software Lab. @ SKKU 21 94

Installing Tizen SDK (Linux) • Run Tizen IDE Embedded Software Lab. @ SKKU 22

Installing Tizen SDK (Linux) • Run Tizen IDE Embedded Software Lab. @ SKKU 22 94

Installing Tizen SDK (Linux) • Select working directory Embedded Software Lab. @ SKKU 23

Installing Tizen SDK (Linux) • Select working directory Embedded Software Lab. @ SKKU 23 94

Installing Tizen SDK (Linux) • Emulator manager Embedded Software Lab. @ SKKU 24 94

Installing Tizen SDK (Linux) • Emulator manager Embedded Software Lab. @ SKKU 24 94

Installing Tizen SDK (Linux) • Need for signing to run application Embedded Software Lab.

Installing Tizen SDK (Linux) • Need for signing to run application Embedded Software Lab. @ SKKU 25 94

Installing Tizen SDK (Linux) • Signing a package Embedded Software Lab. @ SKKU 26

Installing Tizen SDK (Linux) • Signing a package Embedded Software Lab. @ SKKU 26 94

Installing Tizen SDK (Linux) • Problem – Error in executing simulator • Solution –

Installing Tizen SDK (Linux) • Problem – Error in executing simulator • Solution – Setup Chrome browser path • Window Properences Tizen SDK Web Chrome Embedded Software Lab. @ SKKU 27 94

Installing Tizen SDK (Linux) • Setup Chrome browser path --no-first-run --activate-on-launch --no-default-browser-check --allow-file-access-from-files --disable-web-security

Installing Tizen SDK (Linux) • Setup Chrome browser path --no-first-run --activate-on-launch --no-default-browser-check --allow-file-access-from-files --disable-web-security --disable-translate --proxy-auto-detect --proxy-bypass-list=127. 0. 0. 1 Embedded Software Lab. @ SKKU 28 94

Installing Tizen SDK (Linux) • Simulator layout Embedded Software Lab. @ SKKU 29 94

Installing Tizen SDK (Linux) • Simulator layout Embedded Software Lab. @ SKKU 29 94

Installing Tizen SDK (Linux) • Problem – Unable to use Open. JDK • Solution

Installing Tizen SDK (Linux) • Problem – Unable to use Open. JDK • Solution • Reference: JAVA installation – Ubuntu help site: https: //help. ubuntu. com/community/Java Embedded Software Lab. @ SKKU 30 94

31 94 Introduction to Tizen SDK Embedded Software Lab. @ SKKU

31 94 Introduction to Tizen SDK Embedded Software Lab. @ SKKU

What is Tizen SDK? 32 94 • Tools for Tizen app development Embedded Software

What is Tizen SDK? 32 94 • Tools for Tizen app development Embedded Software Lab. @ SKKU 2012 SAMSUNG Electronics Co.

Tizen IDE components Embedded Software Lab. @ SKKU 33 94

Tizen IDE components Embedded Software Lab. @ SKKU 33 94

Event injector • Sensors – – – Accelerometer Gyroscope Geomagnetic Proximity Light Motion •

Event injector • Sensors – – – Accelerometer Gyroscope Geomagnetic Proximity Light Motion • Location – Manual/Map/Log file • Telephony – Call/SMS (from/to event injector) • NFC – – – NDEF (NFC Data Exchange Format) message NFC Tag P 2 P • Device – – Battery level Earjack USB RSSI (Received Signal Strength Indication) Embedded Software Lab. @ SKKU 34 94

Web App Simulator • • • 35 94 Based chrome browser No packaging/installation process

Web App Simulator • • • 35 94 Based chrome browser No packaging/installation process to target (real device or emulator) Run web app without target for the purpose of quick/instant test Embedded Software Lab. @ SKKU

Emulator • 36 94 Emulation of physical target (currently, phone-like) – QEMU Virtual board

Emulator • 36 94 Emulation of physical target (currently, phone-like) – QEMU Virtual board + Event Injector + Emulator manager (configuration) • Better performance and portability – Not all devices are emulated due to performance & portability – Open. GL, Audio/Video codec acceleration • Configurable virtual HW Embedded Software Lab. @ SKKU

Execution with HW VT acceleration • High performance with HW VT support – Inter

Execution with HW VT acceleration • High performance with HW VT support – Inter VT-x or AMD-V – Special kernel driver needed • KVM in Linux and HAXM in Windows Embedded Software Lab. @ SKKU 37 94

Menu of Emulator • Hardware keyboard, screen shot, SDB, rotate, scale • Multi touch

Menu of Emulator • Hardware keyboard, screen shot, SDB, rotate, scale • Multi touch – Ctrl + mouse click Embedded Software Lab. @ SKKU 38 94

Smart Development Bridge 39 • Command tools for emulator/device management • Supplybasic commands for

Smart Development Bridge 39 • Command tools for emulator/device management • Supplybasic commands for application development – file transfer, remote shell command, port forwarding for a debugger, and viewing, filtering, and controlling device log output • Installation – SDB tool in “tizen-sdk/tools/sdb” – To use the sdb commands, • be in the sdb directory • Or add the sdb location toe the environment path variable Command Description sdb push <local> <remote> Copy a file or directory recursively to the device's data file. Content that is generally considered suitable for children three years of age and older. sdb pull <remote> [<local>] Copy a file or directory recursively from the device's data file. sdb shell Run a remote shell interactively by dropping into a remote shell on an Emulator or device instance. • Learn more Embedded Software Lab. @ SKKU 94

UI builder 40 94 • Design user interface for both web and native applications

UI builder 40 94 • Design user interface for both web and native applications Native UI builder Web UI builder Embedded Software Lab. @ SKKU

Packaging an application 41 • Application Package Manager – One of the core modules

Packaging an application 41 • Application Package Manager – One of the core modules of Tizen application framework – Responsible for installing, uninstalling, and updating packages, and storing their information – Retrieve information related to the packages that are installed on the device – Applications in the same package follow the same installation life-cycle and it is handled by the application package manager – The root of the Tizen native package is the path of the ZIP archive and it contains reserved folders Embedded Software Lab. @ SKKU 94

Packaging a web application 42 94 • Widget package includes all the support files

Packaging a web application 42 94 • Widget package includes all the support files that are needed by the widget – Widget is a complete standalone Web application without any additional external resources or network connectivity Embedded Software Lab. @ SKKU

Packaging a web application 43 94 • Package format and file extension – File

Packaging a web application 43 94 • Package format and file extension – File format: ZIP archive file format – File extension: . wgt • Directory hierarchy /bin /<Package ID> Symbolic link to Web runtime /opt /data /config. xml /usr /apps /<Package ID> /res /wgt /icon. png /index. html /css /js Embedded Software Lab. @ SKKU Configuration data Default icon {png|gif|ico|svg} Default start file {html|htm|svg|xhtml|xht} CSS source files Java. Script files

Packaging a native application 44 94 • UI and service applications can be packaged

Packaging a native application 44 94 • UI and service applications can be packaged together • Only one UI application, while one or more service applications Embedded Software Lab. @ SKKU

Packaging a native application 45 • Package format and file extension – File format:

Packaging a native application 45 • Package format and file extension – File format: ZIP archive file format – File extension: . tpk • Directory hierarchy /opt /<Executable Name 1> /usr /bin /apps /data /<Package ID> /lib /res /shared App executable binary /<Executable Name 2> /<Executable Name 3> App private data App libraries /data App resources /res App shared resources /trusted Embedded Software Lab. @ SKKU 94

Packaging a hybrid application 46 94 • Package format and file extension – File

Packaging a hybrid application 46 94 • Package format and file extension – File format: ZIP archive file format – File extension: . wgt • Directory hierarchy /opt /usr /apps /<Package ID> /bin /<Executable Name 1> /data /<Executable Name 2> /info /manifest. xml /lib /icon. png /index. html /wgt Web project root /<Package ID> /res Native resources or web content /data /shared /res /trusted Embedded Software Lab. @ SKKU /css

47 94 Sample Applications & Web Coding Embedded Software Lab. @ SKKU

47 94 Sample Applications & Web Coding Embedded Software Lab. @ SKKU

Sample Application Types • Provided in New project wizard – Native applications • Normal

Sample Application Types • Provided in New project wizard – Native applications • Normal App / UIFW – Web applications • Hybrid / Web Embedded Software Lab. @ SKKU 48 94

Sample Applications Native App Web App Embedded Software Lab. @ SKKU 49 94

Sample Applications Native App Web App Embedded Software Lab. @ SKKU 49 94

Web Application Templates 50 • Basic – Tizen Basic Application • Tizen Web UI

Web Application Templates 50 • Basic – Tizen Basic Application • Tizen Web UI Framework – Web application based on Tizen Web UI Framework • Tizen Web UI Builder – Use a Tizen Builder Project to create Tizen Web application using Tizen Builder • j. Query Mobile – Web application based on j. Query Mobile Embedded Software Lab. @ SKKU 94

Native Application Templates 51 • Library – The template for developing a shared library

Native Application Templates 51 • Library – The template for developing a shared library or static library (*. a) • Service Application – The empty template for developing service application • UI Application – The empty template project for developing UI Application • UI Builder Application – Support Tizen native UI builder Embedded Software Lab. @ SKKU 94

How to write code • 1. Web references – http: //www. w 3 schools.

How to write code • 1. Web references – http: //www. w 3 schools. com/ • Refer to grammar of HTML/CSS, Java. Script, XML, JSON, j. Query. Mobile • Tryit Editor for test code results Embedded Software Lab. @ SKKU 52 94

How to write code • 2. IDE content assist or. Jlint – Content assist;

How to write code • 2. IDE content assist or. Jlint – Content assist; suggest available function or keyword – Jlint; automatically shows the syntax error and warning Embedded Software Lab. @ SKKU 53 94

How to write code • 3. Using sample application provided by Tizen IDE –

How to write code • 3. Using sample application provided by Tizen IDE – Refer to sample code already implemented Embedded Software Lab. @ SKKU 54 94

55 94 HTML 5 Features Embedded Software Lab. @ SKKU

55 94 HTML 5 Features Embedded Software Lab. @ SKKU

Descriptions • Functions – Make a Tizen web application with • Multimedia playing (refer

Descriptions • Functions – Make a Tizen web application with • Multimedia playing (refer to HTML 5 sample code) • Connect web page with URL • Requirements – Header, Footer, Button – page link, listview, tizen video module • TODO – Display recently-visited 5 webpage history with listview – Connect media UI control with javascript function Embedded Software Lab. @ SKKU 56 94

Main page • 57 94 <div>; define division or section of HTML – Add

Main page • 57 94 <div>; define division or section of HTML – Add Header • <h 1> to <h 6>; header tag – Add listview to connect to a new page • <ul>; Define unordered list • <li>; Define list item – Connect each pages with href attribute Embedded Software Lab. @ SKKU

Webpage and Log Layout • Create a page to be linked to the first

Webpage and Log Layout • Create a page to be linked to the first list item – – – Header; Page name Footer; Link to previous page Add a text type of <input> to get URL input Add buttons to manage history Add a listview to print history Embedded Software Lab. @ SKKU 58 94

Webpage and Log Functions • “Go to URL” button – save an element of

Webpage and Log Functions • “Go to URL” button – save an element of <key, value> to local. Storage • “Clear” button – clear local. Storage • update. List() – Append recently saved list item in local. Storage Embedded Software Lab. @ SKKU 59 94

Webpage Results • Connect internet and show history (MRU 5 log) Embedded Software Lab.

Webpage Results • Connect internet and show history (MRU 5 log) Embedded Software Lab. @ SKKU 60 94

Multimedia layout • Screen UI – Define <video> with connecting src – Add play

Multimedia layout • Screen UI – Define <video> with connecting src – Add play control button – Footer; Go back Embedded Software Lab. @ SKKU 61 94

Multimedia functions • initialize() Embedded Software Lab. @ SKKU 62 94

Multimedia functions • initialize() Embedded Software Lab. @ SKKU 62 94

Multimedia Results • Link to video file to be played Embedded Software Lab. @

Multimedia Results • Link to video file to be played Embedded Software Lab. @ SKKU 63 94

64 94 open. API Embedded Software Lab. @ SKKU

64 94 open. API Embedded Software Lab. @ SKKU

Descriptions • Requirement – Web application which can get a selection query and display

Descriptions • Requirement – Web application which can get a selection query and display the result – Use Open API sample file • Todo – Write query and print result Embedded Software Lab. @ SKKU 65 94

Start from new project • Create project – File New Tizen Web Project Tizen

Start from new project • Create project – File New Tizen Web Project Tizen j. Query Mobile Embedded Software Lab. @ SKKU 66 94

Query and Display Layout • • Add buttons for keyword input and search Add

Query and Display Layout • • Add buttons for keyword input and search Add listview to print search result Embedded Software Lab. @ SKKU 67 94