Embedded Software Lab. @ SKKU 69 1 Tizen v2.3 Web Framework.

69
Embedded Software Lab. @ SKKU 69 1 Tizen v2.3 Web Framework

Transcript of Embedded Software Lab. @ SKKU 69 1 Tizen v2.3 Web Framework.

Embedded Software Lab. @ SKKU

69

1

Tizen v2.3 Web Framework

Embedded Software Lab. @ SKKU

69

2

• Web Runtime– Internal Blocks– Feature and Lifecycle

• Tizen Web API• Web Device API, Tizen API, Application API,

Communication API, Content API, Input/Output API, Social API, System API, User Interface API

Contents

Embedded Software Lab. @ SKKU

69

3

• Web application– Using web based technologies– Accessing local device / platform resources– Can be installed on the device

Web Application

Source: Ming Jin , Tizen Web Runtime. Tizen Developer Conference 2012.

Embedded Software Lab. @ SKKU

69

4

• Web framework– aggregates the Web Runtime along with the W3C API, Device

API, and a UI framework containing widgets derived from jQuery Mobile

Web app on the Web framework

Source: Jaesik Chang , Tizen Webkit For Wearable Devices. Tizen Developer Conference 2014.

Embedded Software Lab. @ SKKU

69

5

• Provides:– Best Web experience with Browser and packaged Web Apps

• Focusing on functionality(HTML5), performance (UI Responsiveness, 2D/3D Acceleration, JS Engine), Standard Compliance(W3C)

• More device feature accessibility through Tizen Device API• jQuery Mobile based Tizen Web UI FW enables easy Web App development

• Consists of:– Web Runtime: Execution environment for packaged Web App– WebView (WebKit2/EFL): JavaScriptCore,

WebCore(HTML5/W3C API implementation), WebKit API

Web framework

Source: Sunil Saxena , Tizen Architecture. Tizen Developer Conference 2012.

Embedded Software Lab. @ SKKU

69

6Web UI Framework Launching Flow

Embedded Software Lab. @ SKKU

69

7Web UI Framework Launching Flow

Embedded Software Lab. @ SKKU

69

8

Web Runtime: Internal Blocks

Embedded Software Lab. @ SKKU

69

9

• Web Runtime– Environment within which all web applications run on Tizen– Package management (installation, update, etc.)– Execution and lifecycle (launching, pause, resume, etc.)– Runtime security (API/network access, sandboxing, etc.)– Device and platform integration(access local device and

platform resources)

Web Runtime on Tizen v2.3

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

10Tizen Web Runtime Internal Blocks

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

11Web Runtimeweb

wrt-installer

wrt-common

wrt-security

wrt src

api_new

view view_module.cpp

web-client

web-launcher

web-launchpad-

daemon

runnable_widget_object.cpp

webkitInjected-bundle

Injected-bundle.cpp

view_logic.cpp

core_module.cpp

wrt-client.cpp

launchpad_src

launchpad.c__real_launch()__normal_fork_exec()__fake_launch_app()__prepare_exec()

WrtClient::WrtClient(), OnStop(), OnCreate(), OnReset()

CoreModule::Init(), Terminate()

Show(), Hide(), Suspend(), Resume(), Prepareview()

ViewLogic(), createWebView(), prepareView(), showWidget(), hideWidget()

Load libraries to Webprocess dynamically

IVewModule class pointing to ViewLogic

wrt-launcher.cpp Display_widget_info(), AttachDB()

wrt-security ace._client.cpp checkFunctionCall()

Embedded Software Lab. @ SKKU

69

12

• WRT Installer– After download is finished, install the resources to the appropriate

directories– Register app to WRT database– Extract content of the package file– Check configuration file– Generate manifest file for interacting with native application– Update SMACK (Simplified Mandatory Access Control Kernel) policy

based on requested privileges

Tizen Web Runtime Internal Blocks

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

13

• WRT Client– Callback related to the life-cycle (launch, resume, pause,

terminate)– When new web application is launched, the system spawns two

processes• UI process; manage the life cycle of an app• Web process; responsible for rendering the web content

Tizen Web Runtime Internal Blocks

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

14

• WRT Core– Core module

• Initialize the database, prepare information for launching, check network access

– View module• Creation / deletion web view which contain a web application’s

content• Control view layer including the capability of show, hide, suspend• Use WebKit and EFL Evas canvas library for view layer

– Resource loading, creation of new web view• Add custom JS objects to WebKit view to access Tizen device APIs

Tizen Web Runtime Internal Blocks

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

15

• RunnableWidgetObject– Handle or launch web application at window– Call proper methods at every state changes– Definition of IRunnableWidgetObject interface

• web/wrt/src/api_new/i_runnable_widget_object.h

– Implementation of RunnableWidgetObject• web/wrt/src/api_new/runnable_widget_object.cpp

• ViewLogic– With Webkit and Evas library, geolocation,

notification, plugin function is available

Web core

Embedded Software Lab. @ SKKU

69

16

• IViewModule

Web core

Embedded Software Lab. @ SKKU

69

17

• ViewLogic

Embedded Software Lab. @ SKKU

69

18

• createWebView()

Embedded Software Lab. @ SKKU

69

19

• Injected Bundle– Build a process management mechanism inside the WebKit API

layer– Support additional function to Web Process by loading library

dynamically at startup time like plugin– Unlike plugin, only one shared library can be loaded

Tizen Web Runtime Internal Blocks

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

20

• WRT Security– Provide sandbox environment– Enforce SMACK rules

• Cannot access the files of another application, system files or features unless it has been granted permission

Tizen Web Runtime Internal Blocks

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

21

• WRT Launchpad– Preload WebKit and WRT libraries (such as libewebkit2.so, wrt-

client)– Fork a new process (UI process)

Tizen Web Runtime Internal Blocks

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

22

• Two key daemons to spawn new process(app) in TIZEN – AMD (application management daemon) and launchpad

daemon.

– AMD receives the launch request and forwards it to the launchpad (launchpad_preloading_preinitializing_daemon)

– launchpad is the parent process of all TIZEN apps.

• There are three launchpad daemons;– launchpad, wrt_launchpad and debug_launchpad

– AMD chooses the proper launchpad daemon w.r.t. launch request.

– debug_launchpad itself is launched by sdbd (sdb daemon) only for debugging purpose.

Launchpad

Embedded Software Lab. @ SKKU

69

23

Web Runtime: Features and Lifecycle

Embedded Software Lab. @ SKKU

69

24

• Since Tizen 2.0– Hosted web app support– Installation / Update flow improvement– WebKit2/EFL– Improvement of launching– Resources encryption / decryption– Web dynamic box support– Support system language change– Privilege-based API security– Process sandboxing

Web Runtime on Tizen

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

25

• Hosted web app– A Web app with all of its resources located on a remote

server– For now, it needs to be packaged with minimal

resources: config.xml, signature(s)

• Restrictions– Start page should be specified in <tizen:content>

extension– All of rendered pages are remote pages– Only W3C/HTML APIs are allowed in remote pages– Created browsing context has the same origin as remote

server origin

Hosted Web App Support

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

26

• Installation Flow– New verification steps introduced

• Higher-level privilege declaration is not allowed• Invalid signature is not allowed

– New installation steps introduced• Resource encryption (if necessary)• Smack rules population

• Update Flow– Update criteria

• Must have the same Tizen app ID• Must have the same author signature

– Update triggering point• At installation request time, if the request satisfies the

“update criteria”– Update result

• Web app data (settings, cookies, local storage etc.) must be preserved

Installation/Update flow improvement

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

27Installation/Update flow

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

28

• Web App Process Model– Each Web app has 1 UI process and 1 web process

• UI process manages lifecycle, and Web process is responsible for rendering

– NPAPI plugins (if any) will run in separate processes

Based on WebKit2/EFL

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

29

• wrt-launchpad– to preload WebKit and WRT libraries

Launching procedure

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Ewk: EFL Webkit

Embedded Software Lab. @ SKKU

69

30WRT – Lifecycle

Source: Ming Jin , Tizen Web Runtime. Tizen Developer Conference 2012.

Embedded Software Lab. @ SKKU

69

31

• Suspend / Resume– By default, webviews will be suspended by WRT when

the Web App goes to background, unless the developer explicitly enables it via <tizen:setting> • Suspended activities include: JavaScript executions, timers,

animations • Even if a webview is not suspended in background, the

painting operations will not happen in background and the backing store will be purged

– When switched to foreground, the suspended webviews will be resumed

WRT – Lifecycle

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

32

• Folder-based localization – Web App contents can be localized in file unit according

to W3C Widget P&C specification – The localization requires page reloading, and the

localized contents will only be reflected at next launching time

• Element-based localization – Configuration document can be localized with xml:lang

attribute • Content-based localization

– System locale change event can be listened with Tizen System Info API

– L10n routine needs to be implemented in locale change event handler

Support system language change

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

33

• Resources are encrypted during installation / update – Enabled with <tizen:setting encryption=“enable”/>

in config.xml – Web App directory is scanned recursively – Only resources with predefined extensions (html / js

/ css) are encrypted – Information about encrypted resources are stored

in WRT DB • Resources are decrypted at runtime

– UI Process informs Bundle (WebProcess) about the decryption necessity

– Resources are decrypted to base64 string and read by WebKit

Resource Encryption / Decryption

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

34

• Resource Encryption at Install / Update Time

Resource Encryption / Decryption

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

35

• Resource Decryption at Loading Time

Resource Encryption / Decryption

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

36

• WRT install WDB at the time when its Web app is installed (WDB resources are packaged with its Web app)

• On uninstallation, WDB resources are removed with its Web app– Supported sizes: 1x1, 2x1, 2x2– Supports periodic update

Web Dynamic box support

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.https://developer.tizen.org/ko/documentation/ux-guide/basic-interactions/dynamic-box

Embedded Software Lab. @ SKKU

69

37

• Web app (UI/Web process) sandboxing– UID: “app”– GUID: “app”– Process smack label: {PkgID}– Resource smack label: {PkgID}– Smack rules: basic application rules + privilege specific

rules

• Web app private data (e.g., localstorage, indexed db, cookie, etc.) is protected from the rest of system after sandboxing

Process sandboxing

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

[subjectLabel] [objectLabel] [access(rwxa)]

Embedded Software Lab. @ SKKU

69

38

• Privilege– A predefined collection of privileged APIs that can be

assigned to the application to allow it to call the privileged APIs

– Ex. http://tizen.org/privilege/account.read

• Privilege level– A defined access level for the APIs, based on their influence– Public

• Alarm, application, bluetooth, calendar, call history, contact, file system, message port, messaging, power, push, setting, system, etc.

– Partner• App manager, secure element, system manager, etc.

– Platform• Bluetooth manager, lock manager, package manager, setting

manager, etc.

Privilege-based API security

Source: Ming Jin , Tizen Web Runtime Update. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

39Privileges

Embedded Software Lab. @ SKKU

69

40

• Access Control enforcements– Tizen WRT supports Tizen WebApps and multiple APIs:

W3C APIs, and non-W3C APIs like WebGL and Tizen Web API

– WRT has a multi-process model • WebKit based • Widget instances are executed in separate processes • Provides runtime isolation and allows the system to

enforce custom process-level containment (sandbox) on each instance

– Two levels of access control enforcements • WRT Access Control Engine(ACE): Fine-grained

access control on JS APIs • Application Sandbox via SMACK: Process-level

containment by the kernel on system calls

Privilege-based API security

Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.

Embedded Software Lab. @ SKKU

69

41

• Access control model– A subset of the JavaScript APIs supported in Tizen are

considered restricted • Restricted refers to any JS function that can access the private data

on a device such as location, contacts, calendar, etc.

– Widgets need authorization to invoke restricted APIs – Permission declarations and authorization:

• Declaration in manifest file: – <feature> element for device APIs – <access> element for network resources

– Authorization: • prompt type decision according to WRT ACE policy user

confirmations

Privilege-based API security

Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.

Embedded Software Lab. @ SKKU

69

42

• Access Control Engine– Component responsible for Tizen policy management– Evaluates policy per single request– Manages policy and prompt verdict cache

Privilege-based API security

Source: Ming Jin , Tizen Web Runtime. Tizen Developer Conference 2012.

<feature name=http://tizen.org/api/filesystem required=“true”/>

Embedded Software Lab. @ SKKU

69

43

• ACE policy Evaluation

PEP (Policy Enforcement Point) : ACE interface for WRT PIP (Policy Information Point): Responsible for obtaining attribute values from WRT, Resource Information and OS PDP (Policy Decision Point): evaluates policies; Interacts with the user if necessary Policy Translator: Parses policies (XML) Verdict Manager: Responsible for caching the verdicts

Access Control Enforcements

Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.

Embedded Software Lab. @ SKKU

69

44

• Process Sandbox via SMACK– The SMACK Policy File is updated with the appropriate rules

during the install, update, or uninstall operations, as well as at run-time

– Rules are based on device features (manifest file), user confirmations, and security files (label, permissions for each feature)

Access Control Enforcements

Source: Onur Aciicmez , Understanding the Permission and Access Control Model for Tizen Application Sandboxing. Tizen Developer Conference 2012.

Widget requests access

to a device feature

ACE System

Return result to WRT

Access is made to a device feature

Linux Kernel SMACKLSM

Check access rights in the SMACK Policy

File

Embedded Software Lab. @ SKKU

69

45

Tizen Web API

Embedded Software Lab. @ SKKU

69

46

• W3C API– implements web standards relating to DOM, styles, device, graphics,

media, communication, storage, security, UI, performance, location, and widget

• The Device API – provides advanced logic employing sensors, file I/O, capturing,

telephony, FM radio, speech recognition, HDMI output, and more

Web API support

Source: Tizen Overview and Architecture, Seokjae Jeong, Korea Linux Forum 2012.

Embedded Software Lab. @ SKKU

69

47

• Limitations of standard specifications– Most of them are still working drafts– No full support for the Tizen characteristic

features

• Tizen Web device APIs– Device APIs give the characteristic features of

the Tizen platform– Device APIs have been updated agilely

Why Tizen Web Device APIs?

Source: Tizen – Universal Device Platform, Wonseok Lee, Samsung Electronics.

Embedded Software Lab. @ SKKU

69

48

• Follows W3C specification API style– Numerical constants avoided but string

enumerations used– Most methods are asynchronous– Success and error callback, and constructors used

• Based on standard technologies– Tizen Web device API specifications are written in

WebIDL– Implementation follows the fundamental rule of

ECMAScript 5.1 and W3C WebIDL recommendation (for example, type conversion)

• Defined tizen namespace– All Tizen device APIs exist in the tizen namespace– tizen is the global object to which all Tizen device

APIs are bound

Tizen Web Device APIs Design

Source: Tizen – Universal Device Platform, Wonseok Lee, Samsung Electronics.

Embedded Software Lab. @ SKKU

69

49

• Defined tizen namespace

Tizen Web Device APIs Design

Source: Tizen – Universal Device Platform, Wonseok Lee, Samsung Electronics.

Embedded Software Lab. @ SKKU

69

50Tizen Web Device API Modules

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.web.apireference/html/web_api_reference.htm

Embedded Software Lab. @ SKKU

69

51

• Tizen – Provides Tizen’s common functionalities

• Contains object interfaces that are commonly used throughout the other modules

– The tizen object is the topmost object providing the foundations for accessing Tizen device features

Tizen APIs (1/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

52

• Tizen’s common object interfaces – Generic asynchronous callback handling

• Success callback for methods that do not require a return value • Error callback for methods that require an error as input parameter

• Generic error and exception handling – Tizen APIs throw a WebAPIException object and returns a

WebAPIError object through error callbacks – These follow the style and types of error of DOM4 specification.

• Filters and sort modes – Filters are used to limit query results and compose complex

queries – Generally, filters are used with the find() method in Calendar,

Call History, Contact, Content, and Messaging modules

Tizen APIs (2/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

// Create an attribute filter based on first name: "First name should contain 'Chris' (case insensitive)" var filter = new tizen.AttributeFilter("name.firstName", "CONTAINS", "Chris"); // Sort by first name, ascending var sortMode = new tizen.SortMode("name.firstName", "ASC"); // Send request on contact address book. tizen.contact.getDefaultAddressBook().find(successCallback, errorCallback, filter, sortMode);

Embedded Software Lab. @ SKKU

69

53

• Alarm – Schedules an application to be launched at a specific

time

• Application – Manages current application (this application) – Manages other applications

• Retrieves information of applications – Launches other applications

• Application control

Application APIs (1/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

/* Alarm is triggered at 8:00 on April 4, 2012 */var date = new Date(2012, 3, 4, 8, 0);var alarm1 = new tizen.AlarmAbsolute(date);/* Alarm is triggered in 3 hours */ var alarm2 = new tizen.AlarmRelative(3 * tizen.alarm.PERIOD_HOUR);

var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/pick", null, "image/*", null, null);tizen.application.launchAppControl(appControl, null, successCb, errCb, null);

Embedded Software Lab. @ SKKU

69

54

• Package – Retrieves information of installed packages – Checks the updates of the installed package list – Installs or uninstalls packages – partner privileged

• Data Control – Exchanges specific data with the data control provider

application • Data control provider application can be implemented as a

native application – Data control types:

• SqlDataControl– SQL-type data control – data consists of rows and columns

• MapDataControl– key-value-type data control

– partner privileged

Application APIs (2/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

55

• Bluetooth – Manages Bluetooth devices – Discovers nearby devices, and bonds or pairs with found devices – Connects to devices to exchange data with them

• NFC – Manages NFC devices – Detects NFC tag and peer – Exchanges NDEF data

• Messaging – Sends or receives SMS, MMS, or email messages – Retrieves the message storage

Communication APIs (1/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

var nfcAdapter = tizen.nfc.getDefaultAdapter();nfcAdapter.setPowered(true, onPowerOn, onPowerOnFails);

Embedded Software Lab. @ SKKU

69

56

• Network Bearer Selection – Sets a network bearer for a specific IP address or

domain name – partner privileged

• Secure Element – Provides functionality to communicate with applications

in several secure elements, such as UICC/SIM, embedded Secure Element, or Secure SD card

– partner privileged

• Push – Receives push notifications from the Tizen push server

Communication APIs (2/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

57

• Content – Discovers and manages images, video, music,

and other files – Scans content or directory metadata in the

device and updates the content database – Retrieves content from content database using

filters – Browses content by getting a list of content

directories – Views and edits content item details

Content APIs (1/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

58

• Download – Downloads files from a specific URL – Enables applications to manage download

operation details • Sets the stored location of a downloaded file • Sets the network type: cellular, Wi-Fi, or default• Get operation status: current received size and

events • Gets the file MIME type

Content APIs (2/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

59

• Filesystem – Accesses the file system virtual root locations

• Documents, downloads, images, music, videos, ringtones, wgt-package, wgt-private, and wgt-private-tmp

– Manages file storage • Internal and external • Mounted, removed, or unmountable

– Accesses files and directories – Creates, reads, edits or deletes files and

directories

Input/Output APIs

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

60

• Message Port – Communicates with other applications: IPC

based on application ID

Input/Output APIs

Embedded Software Lab. @ SKKU

69

61

• Contact – Manages contacts in device address books

• Including adding, searching, updating, and deleting

– Manages persons • Person is the aggregation of one or more contacts

that are the information of the same person

– Supports vCard 3.0

Social APIs (1/3)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

62

• Calendar – Manages events and tasks

• Including adding, searching, updating, and deleting • Each event or task has a series of attributes, such as

purpose, starting time, and duration

– Monitors the changes in events and tasks – Supports iCalendar v2.0, based on RFC 5545

• Call History – Browses the call history of a device – Removes call history entries – Monitors changes

Social APIs (2/3)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

63

• Bookmark – Manages bookmarks and bookmark folders – Browses bookmark folders – platform privileged

• Data Synchronization – Synchronizes device data to the server using

the OMA DS(Data Synchronization) 1.2 protocol • Contact data or calendar data

– Manages the OMS DS profile slots • Tizen platform sets a limitation on the number of

supported profiles • Adds, updates and removes profiles

Social APIs (3/3)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

64

• Time – Provides TZDate type that is an extended type of

ECMAScript date • It contains the time zone information as well as time

information

– Provides utility functions for managing system time and duration • Methods for getting local time or time zone • Methods for calculating time duration

• System Information – Enables access various properties of the system

• Bluetooth, NFC, Wi-Fi, Front/back Camera, Flash, GPS, Sensors, Platform and API version, USB host/accessory

– Monitors the change of system information

System APIs (1/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

65

• System Setting – Sets or gets the system setting values

• HOME_SCREEN: Home screen background image • LOCK_SCREEN: Lock screen background image • INCOMING_CALL: incoming call ringtone • NOTIFICATION_EMAIL: email notification alert tone

• Power – Manages the power state for the screen resource

• Sets or gets the state of the screen: off, dim, normal, or bright

• Monitors the changes in the state of the screen

– Sets the CPU not to sleep

System APIs (2/2)

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

66

• Notification– Posts UI notifications about application events

User Interface APIs

Source: Kisub Song , Tizen Web Device API. Tizen Developer Conference 2013.

Embedded Software Lab. @ SKKU

69

67

• New Web Runtime (tizen 3.0)– Web, Multimedia, Device APIs

• https://crosswalk-project.org/• open source, released under a BSD licence.

– founded by Intel's Open Source Technology Center.

• Blink rendering and layout engine• Designed for Tizen but also for Android• Backwards compatible with Tizen 2.x WRT• Cordova Device APIs

Crosswalk

Embedded Software Lab. @ SKKU

69

68Crosswalk Architecture - Modules

Embedded Software Lab. @ SKKU

69

69

• Shared process model• BP is shared with all

WebApps• WebApp contains EP and

RP• RP is sandboxed and can’t

do OS calls• RP delegates OS calls to

BP via IPC• EP is not sandboxed and

can do OS calls

Crosswalk Architecture - Runtime