Tizen Web Runtime. Device API



Similar documents
Introduction to Tizen SDK Alpha. Taiho Choi Samsung Electronics

Development Techniques for Native/Hybrid Tizen Apps. Presented by Kirill Kruchinkin

Tizen Web Runtime Update. Ming Jin Samsung Electronics

HTML5 Applications Made Easy on Tizen IVI. Brian Jones / Jimmy Huang

WebSocket Server. To understand the Wakanda Server side WebSocket support, it is important to identify the different parts and how they interact:

Developers Guide version 1.1

ISL Online Integration Manual

User Guide. BlackBerry Storm 9530 Smartphone. Version: 4.7

How To Use Titanium Studio

Responsive Web Design Creative License

Secure Work Space for Android. User Guide

Frequently Asked Questions for the USA TODAY e-newspaper

Qualtrics Question API

How To Write A File Station In Android.Com (For Free) On A Microsoft Macbook Or Ipad (For A Limited Time) On An Ubuntu 8.1 (For Ubuntu) On Your Computer Or Ipa (For

Switching to Gmail from Microsoft Outlook

Developing Native JavaScript Mobile Apps Using Apache Cordova. Hazem Saleh

Web Browser. Fetches/displays documents from web servers. Mosaic 1993

Event2CRM Quick Start User Guide

Oracle Beehive. Using Windows Mobile Device Release 2 ( )

Step into the Future: HTML5 and its Impact on SSL VPNs

Tizen Core APIs: A Core Framework Layer To Build In-House Applications. Jin-Woo Jeong

Implementation of the plug-in is very easy and only relies on one JQuery function call to initiate.

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

Contents. New features. Getting started. Entertainment. Transferring data. Managing your phone. Tools

Professional Tizen Application Development

FirstClass Export Tool User and Administration Guide

Life after Microsoft Outlook

StreamServe Persuasion SP4 StreamServe Connect for SAP - Business Processes

Firefox for Android. Reviewer s Guide. Contact us: press@mozilla.com

Cisco Jabber for Windows 10.5 Advanced Features Guide

How to develop your own app

OmniTouch 8400 Instant Communications Suite. My Instant Communicator Desktop User guide. Release 6.7

Samsung Galaxy S II Software Upgrade

Login with Amazon Getting Started Guide for Android. Version 2.0

Initial Setup of Mozilla Thunderbird with IMAP for OS X Lion

Web Browser Session Restore Forensics A valuable record of a user s internet activity for computer forensic examinations

Development Techniques for Native/Hybrid Tizen Apps. Presenter Matti Pakarinen

HTML5 Features on Tizen. Wonsuk Lee, Samsung Electronics

The In-Stream LogoKit is an In-Stream linear and non-linear ad format that plays in VPAID-compliant video players. The ad displays icons in the

Sizmek Formats. Swell. Build Guide

Getting Started with Zoom

WEB DESIGN COURSE CONTENT

Make Voice Calls and Share Documents using Skype*

Republic Polytechnic School of Infocomm C308 Web Framework. Module Curriculum

Qsync Install Qsync utility Login the NAS The address is :8080 bfsteelinc.info:8080

Spring Design ScreenShare Service SDK Instructions

Cloud Services MDM. ios User Guide

Repeater. BrowserStack Local. browserstack.com 1. BrowserStack Local makes a REST call using the user s access key to browserstack.

1 Classified Script. User Guide v1.0

PopupProtect User Guide

RSCCD REMOTE PORTAL TABLE OF CONTENTS: Technology Requirements NOTE

Life after Microsoft Outlook Version 3

Operational Decision Manager Worklight Integration

FAQ for ipad (ios 5.x)

Zimbra Connector for Outlook User Guide. Release 6.0

BlackBerry Enterprise Service 10 version 10.2 preinstallation and preupgrade checklist

Enabling Cordova (aka PhoneGap) on Tizen. René Pourtier / Luc Yriarte

DocuSign for Salesforce Administrator Guide v6.1.1 Rev A Published: July 16, 2015

Login and Pay with Amazon Integration Guide

Salesforce Mobile Push Notifications Implementation Guide

QML and JavaScript for Native App Development

Certified PHP/MySQL Web Developer Course

New Features in Outlook Web Access

Skills for Employment Investment Project (SEIP)

Tutorial for Android users *with the CONNECTED WATCH App

MASTERTAG DEVELOPER GUIDE

Q-Cam Professional V 1.1 User Manual

Designing for the Mobile Web Lesson 3: HTML5 Web Apps

Site Administrator Guide

Elgg 1.8 Social Networking

EMC Documentum Webtop

ThermochronWM22 Application for Windows Mobile Getting Started. Step 1: Install PC Applications Step 2: Install USB Adapter...

1 Introduction. Contents. Scanner support

SAP BusinessObjects Business Intelligence Platform Document Version: 4.1 Support Package Business Intelligence Launch Pad User Guide

Vodafone Text Centre User Guide for Microsoft Outlook

Course Summary. Prerequisites

JTouch Mobile Extension for Joomla! User Guide

Wave 4.5. Wave ViewPoint Mobile 2.0. User Guide

Sabre Red Apps. Developer Toolkit Overview. October 2014

INTERMEDIATE ANDROID DEVELOPMENT Course Syllabus

Protected Trust Directory Sync Guide

WebEx Event Center User's Guide

Making Web Application using Tizen Web UI Framework. Koeun Choi

5.1 Features Denver CO 80202

Android Mobile Phone User Manual

Egnyte for Power and Standard Users. User Guide

Camilyo APS package by Techno Mango Service Provide Deployment Guide Version 1.0

WebEx Event Center User's Guide

Introduction to Android. CSG250 Wireless Networks Fall, 2008

Scheduling Software User s Guide

Infinitel HotSpotWeb User Manual

Creating an Intranet Website for Library & Information Services in an Organization

WebEx Meeting Center User Guide

Responsive Web Design for Teachers. Exercise: Building a Responsive Page with the Fluid Grid Layout Feature

MS Enterprise Library 5.0 (Logging Application Block)

^/ CS> KRIS. JAMSA, PhD, MBA. y» A- JONES & BARTLETT LEARNING

CONFIGURATION MANUAL FILE TRANSFER DAEMON. Version June 2014

Developing Web Views for VMware vcenter Orchestrator

2 Session buttons. 1 Phone Screen

Transcription:

Tizen Web Runtime. Device API 1

Что нового в html5 Элементы разметки: article, nav, header, footer... Поддержка API 2D drawing video, audio Offline web Drag and Drop File API Геолокация Базы данных (key-value) 2

Html + javascript hello.html <!DOCTYPE html> <html> <head> <script type="test.js"></script> </head> <body> Html+js helloworld </body> </html> test.js var init = function(){ alert("helloworld"); window.onload = init; 3

Timer logo 4

Timer logo details in HTML <img id="logo" src="images/tizen_32.png" alt="tizen logo"> in main.js var image = document.getelementbyid("logo"); image.style.webkittransform = ('rotatex(' + anglex + 'deg)') + ('rotatey(' + angley + 'deg)'); 5

Web API place in platform 6

Device API overview Tizen (Common) Communication Social Content Input/Output System Application User interface (notifications) 7

Privileges 8

Privilege levels https://www.tizen.org/ru/privilege Public open to all Tizen application developers Partner can only be used by developers registered as partners on the Tizen store Platform can be used by system APIs for managing the Tizen platform 9

Tizen API Basic definitions and interfaces Contains: filters attribute attribute range composite sorting modes Web API errors/exception handlers callbacks 10

Filter example // Define success callback function successcallback(events) { console.log(events.length + " events today."); // Define error callback function errorcallback(error) { console.log("an error occurred: " + error.message); // Create an attribute range filter based on event start date: "All events occurring today". var now_dt = tizen.time.getcurrentdatetime(); var today_begin = new tizen.tzdate(now_dt.getfullyear(), now_dt.getmonth(), now_dt.getdate()); var today_end = today_begin.addduration(new tizen.timeduration(1, "DAYS")); var filter = new tizen.attributerangefilter("startdate", today_begin, today_end); // Send a search request to default event calendar. tizen.calendar.getdefaultcalendar("event").find(successcallback, errorcallback, filter); 11

Application API Implements Application and Application context management: get information about application/context launch/kill list of installed apps application events callback oninstalled onuninstalled onupdated 12

Application example // Get application name var appinfo = tizen.application.getappinfo(null); console.log("current application name : " + appinfo.name); // Hide current application var app = tizen.application.getcurrentapplication(); app.hide(); 13

Example: Application API <form id="application"> <label for="app name">name of application</label> <input id="appname"> <button onclick="runapplication()">run</button> </form> document.getelementbyid("appname").value ="9BwRJcbDae.helloworld" tizen.application.launch(appname, success, failure); 14

Communication API Bluetooth Messaging: SMS, MMS, E-mails NFC Push notifications Secure elements access 15

Push notification Push notification is a Tizen Association Service Interface for the proactive interaction (server initiates connection) App registration as a Push Service (might take long time) is required (but can be emulated in WebSimulator) Push notification sending is avilable using RESTful API 16

Communication example // Define the callbacks function messagesent(recipients) { console.log("the SMS has been sent"); function messagefailed(error) { console.log("the SMS could not be sent " + error.message); function serviceerrorcb(error) { console.log("cannot get messaging service " + error.message); function servicelistcb(services) { if (services.length > 0) { // SMS sending example var msg = new tizen.message("messaging.sms", { plainbody:"i will arrive in 10 minutes.", To:["+479218777222"] ); // Send request services[0].sendmessage(msg, messagesent, messagefailed); // Get access to sms messaging service 17 tizen.messaging.getmessageservices("messaging.sms", servicelistcb, serviceerrorcb);

Content API Access to media files (audio, video, image,...) ContentManager global tizen object browsing content view and update update notifications DownloadRequest interface for downloading content from the web. 18

Download example var listener = { onprogress: function(id, receivedsize, totalsize) { console.log('received with id: ' + id + ', ' + receivedsize + '/' + totalsize);, onpaused: function(id) { console.log('paused with id: ' + id);, oncanceled: function(id) { console.log('canceled with id: ' + id);, oncompleted: function(id, filename) { console.log('completed with id: ' + id + ', file name: ' + filename);, onfailed: function(id, error) { console.log('failed with id: ' + id + ', error name: ' + error.name); ; // Start downloading the html file on the web with the corresponding callbacks. var downloadrequest = new tizen.downloadrequest( "http://download.tizen.org/tools/readme.txt", "documents"); downloadid = tizen.download.start(downloadrequest); // Add the listener. tizen.download.setlistener(downloadid, listener); 19

Input/Output API Filesystem: collection of disjointed filesystem virtual root locations, each corresponding to a specific location in the device filesystem MessagePort interacts as local IPC(Inter-Process- Communication) mechanism. 20

Filesystem example function onsuccess(files) { for(var i = 0; i < files.length; i++) { // alerts each name of dir's contents console.log(files[i].name); function onerror(error) { console.log("the error " + error.message + " occurred when listing the files in the selected folder"); //list directory contents dir.listfiles(onsuccess, onerror); 21

MessagePort Data is wrapped into JSON array of key/value pairs Connection control using app ID, message port name Trusted MessagePort: Two interacting applications must be signed with the same sertificate Only onmessagerecieved event can be controlled 22

MessagePort example //Sends message var localmsgport = tizen.messageport.requestlocalmessageport('messageporta'); var remotemsgport = tizen.messageport.requestremotemessageport( '6xaeuflskd.App1', 'MessagePortB'); localmsgport.addmessageportlistener(function(items, remoteport) { //... if(remoteport!== null) { remoteport.sendmessage([{key:'result', value:'ok']); ); remotemsgport.sendmessage([{ key:'cmd', value:'openwindow', { key:'option', value:'bx' ], localmsgport); 23

System API General system information (network/hardware) Power: status for CPU/Screen control for the screen state (on/off/brightness) System settings (wallpapers and ringtones) Time - information regarding date / time and time zones Web settings (cookies,...) 24

System API example function onsuccesscallback(battery) { console.log("low battery: " + battery.level); tizen.systeminfo.addpropertyvaluechangelistener( "BATTERY", onsuccesscallback, { LowThreshold : 0.2 ); 25

Social API Management for web bookmarks calendars, events, tasks call history contacts supports Open Mobile Alliance data synchronization protocol. 26

Calendar example // Defines the error callback. function errorcallback(response) { console.log( 'The following error occurred: ' + response.name); function addeventssuccess(events) { console.log("successfully added " + events.length + " events!"); // Gets the default calendar var calendar = tizen.calendar.getdefaultcalendar("event"); var ev = new tizen.calendarevent({description:'tizen Introduction', summary:'tizen devlab', startdate: new tizen.tzdate(2011, 3, 30, 10, 0), duration: new tizen.timeduration(1, "HOURS"), location:'saint-petersburg'); calendar.addbatch([ev], addeventssuccess, errorcallback); 27

Example: deviceorientation interface DeviceOrientationEvent : Event { readonly attribute double? alpha; readonly attribute double? beta; readonly attribute double? gamma; readonly attribute boolean absolute; void initdeviceorientationevent(in DOMString type, in boolean bubbles, in boolean cancelable, in double? alpha, in double? beta, in double? gamma, in boolean absolute); window.addeventlistener("deviceorientation", handledeviceorientation, false); 28

Example: canvas <canvas id="canvas" width="300" height="300"></canvas> canvas = document.queryselector("canvas"); context = canvas.getcontext("2d"); // HACK for canvas clear canvas.width = canvas.width; context.clearrect(0, 0, context.canvas.width, context.canvas.height); context.linewidth = 4; //context.moveto(...) //context.lineto(points[i].x, points[i].y); context.storke(); 29

Questions mark.zaslavskiy@gmail.com 30