
c202d6d5826bf48228f7269c19485935.ppt
- Количество слайдов: 67
1 67 Tizen v 2. 3 SDK & App Development Sungkyunkwan University Embedded Software Lab. @ SKKU
Contents • 2 67 Tizen v 2. 3 SDK – Installing Tizen v 2. 3 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 67 Installing Tizen v 2. 3 SDK for Windows Embedded Software Lab. @ SKKU
Installing Tizen v 2. 3 SDK (Windows) • 4 Tizen v 2. 3 SDK image download – https: //developer. tizen. org/development/tools/download? langswitch=en • Tizen v 2. 3 SDK Contents – IDE(Integrated Development Environment) • • – – • Eclipse IDE based Tizen-specific development tool add-on Emulator Toolchain Sample code Documentation Tizen v 2. 3 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 67
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 SDK (Windows) 7 • Download specific version of install manager and SDK image according to development environment Embedded Software Lab. @ SKKU 67
Installing Tizen v 2. 3 SDK (Windows) • Steps of SDK installation Embedded Software Lab. @ SKKU 8 67
Installing Tizen v 2. 3 SDK (Windows) 9 • You can designate the path of package and pre-downloaded image in advanced option Embedded Software Lab. @ SKKU 67
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 SDK (Windows) • Complete installation and run Tizen IDE – Starts > Tizen SDK > Tizen IDE Embedded Software Lab. @ SKKU 11 67
Installing Tizen v 2. 3 SDK (Windows) • Set the path of working directory and run Tizen SDK Embedded Software Lab. @ SKKU 12 67
Installing Tizen v 2. 3 SDK (Windows) • Main screen Embedded Software Lab. @ SKKU 13 67
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 SDK (Windows) • Event Injector – Generate Events in Tizen emulator – Telephony, Sensor, NFC, Location etc. Embedded Software Lab. @ SKKU 16 67
17 67 Installing Tizen v 2. 3 SDK for Linux Embedded Software Lab. @ SKKU
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 SDK (Linux) • Install necessary packages • Install manager download Embedded Software Lab. @ SKKU 19 67
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 SDK (Linux) • Using Install manager Embedded Software Lab. @ SKKU 21 67
Installing Tizen v 2. 3 SDK (Linux) • Run Tizen IDE Embedded Software Lab. @ SKKU 22 67
Installing Tizen v 2. 3 SDK (Linux) • Select working directory Embedded Software Lab. @ SKKU 23 67
Installing Tizen v 2. 3 SDK (Linux) • Emulator manager Embedded Software Lab. @ SKKU 24 67
Installing Tizen v 2. 3 SDK (Linux) • Need for signing to run application Embedded Software Lab. @ SKKU 25 67
Installing Tizen v 2. 3 SDK (Linux) • Signing a package Embedded Software Lab. @ SKKU 26 67
Installing Tizen v 2. 3 SDK (Linux) • Problem – Error in executing simulator • Solution – Setup Chrome browser path • Window Properences Tizen SDK Web Chrome Embedded Software Lab. @ SKKU 27 67
Installing Tizen v 2. 3 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 67
Installing Tizen v 2. 3 SDK (Linux) • Simulator layout Embedded Software Lab. @ SKKU 29 67
Installing Tizen v 2. 3 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 67
31 67 Introduction to Tizen v 2. 3 SDK Embedded Software Lab. @ SKKU
What is Tizen v 2. 3 SDK? 32 67 • Tools for Tizen app development Embedded Software Lab. @ SKKU 2012 SAMSUNG Electronics Co.
Tizen v 2. 3 IDE components Embedded Software Lab. @ SKKU 33 67
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 67
Web App Simulator • • • 35 67 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 67 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 VT-x or AMD-V – Special kernel driver needed • KVM in Linux and HAXM in Windows Embedded Software Lab. @ SKKU 37 67
Menu of Emulator • Hardware keyboard, screen shot, SDB, rotate, scale • Multi touch – Ctrl + mouse click Embedded Software Lab. @ SKKU 38 67
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
UI builder 40 67 • 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 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 67
Packaging a web application 42 67 • 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 67 • Package format and file extension – File format: ZIP archive file format – File extension: . wgt • Directory hierarchy /bin /
Packaging a native application 44 67 • 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: ZIP archive file format – File extension: . tpk • Directory hierarchy /opt /
Packaging a hybrid application 46 67 • Package format and file extension – File format: ZIP archive file format – File extension: . wgt • Directory hierarchy /opt /usr /apps /
47 67 Sample Applications & Web Coding Embedded Software Lab. @ SKKU
Sample Application Types • Provided in New project wizard – Native applications • Normal App / UIFW – Web applications • Hybrid / Web Embedded Software Lab. @ SKKU 48 67
Sample Applications Native App Web App Embedded Software Lab. @ SKKU 49 67
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 67
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 67
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 67
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 67
How to write code • 3. Using sample application provided by Tizen IDE – Refer to sample code already implemented Embedded Software Lab. @ SKKU 54 67
55 67 HTML 5 Features Embedded Software Lab. @ SKKU
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 67
Main page • 57 67
- ; Define unordered list •
- ; 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 list item – – – Header; Page name Footer; Link to previous page Add a text type of to get URL input Add buttons to manage history Add a listview to print history Embedded Software Lab. @ SKKU 58 67
Webpage and Log Functions • “Go to URL” button – save an element of
Webpage Results • Connect internet and show history (MRU 5 log) Embedded Software Lab. @ SKKU 60 67
Multimedia layout • Screen UI – Define
Multimedia functions • initialize() Embedded Software Lab. @ SKKU 62 67
Multimedia Results • Link to video file to be played Embedded Software Lab. @ SKKU 63 67
64 67 open. API Embedded Software Lab. @ SKKU
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 67
Start from new project • Create project – File New Tizen Web Project Tizen j. Query Mobile Embedded Software Lab. @ SKKU 66 67
Query and Display Layout • • Add buttons for keyword input and search Add listview to print search result Embedded Software Lab. @ SKKU 67 67