webinos APIs
-
Upload
webinos-project -
Category
Technology
-
view
1.281 -
download
2
description
Transcript of webinos APIs
Rev PA3 2012-06-19 1Rev PA3 2012-06-19 1
Webinos APIs
Presentation for Webinos launch day June 19 2012
Claes Nilsson – Sony Mobile
Rev PA3 2012-06-19 2
Scope
Javascript APIs for web application developers– Provides access to HW and SW
capabilities– Also access to capabilities on
remote devices in Personal Zones
Rev PA3 2012-06-19 3
Inventing the wheel again?
Rev PA3 2012-06-19 4
API landscape
WAC
DAPWeb apps
System appsWeb RTC
Geolocation
What WG
WebAPI
Use existing APIswhen possible.
If necessary make Webinos additions/ modifications
If needed specify new Webinos APIs.
Work with W3C standardization – provide input to W3C.
Rev PA3 2012-06-19 5
Phase 1 API specifications
Done June 30 2011 Link to phase 1 API specifications Link to phase 1 API specifications based o
n category
Rev PA3 2012-06-19 6
New Webinos phase 1 API specifications
Webinos Core module Webinos Discovery module Webinos Sensor module Webinos TV Control module Webinos Vehicle module Webinos NFC module Webinos Payment module Webinos Event Handling module Webinos Attestation module (discontinued in phase 2) Webinos Authentication module Webinos Context module
Rev PA3 2012-06-19 7
New Webinos Phase 1 API specifications modified from existing W3C, WAC and Bondi specifications
Webinos Device Status Vocabulary - WAC 2.0 devicestatus module with added Webinos aspects
Webinos Messaging module - WAC 2.0 Messaging module with Webinos modifications
Webinos Widget module - Based on W3C Widget Interface Webinos AppLauncher module - Based on BONDI 1.1 Webinos Userprofile module - Based on W3C DAP Contacts and
Portablecontacts (discontinued in phase 2)
Rev PA3 2012-06-19 8
Unmodified referenced APIs from W3C or WAC
W3C Geolocation API W3C DeviceOrientation Event W3C Media Capture (discontinued in phase 2) WAC 2.0 devicestatus module WAC waikiki deviceinteraction module W3C Contacts API W3C Calendar API W3C File API: Reader W3C File API: Writer W3C File API: Directories and System W3C Gallery API
Rev PA3 2012-06-19 9
Access to capabilities on remote devices Webinos Service Discovery API
– Discover local or remote services without any previous knowledge of the service. API hides details of underlying low level discovery and communication protocols.
– Discovered and selected service accessed through standard or Webinos APIs
– New API needed as existing low level Service Discovery mechanisms such as Bluetooth service discovery, Universal Plug & Play, mDNS, DNS Service Discovery, etc are not exposed to web application developers.
Rev PA3 2012-06-19 10
Example - access to geolocation service on remote device
Peter: PZH(Personal Zone Hub)
Security Policy
Peter: PZP(Personal Zone Proxy)
Peter: PZP(Personal Zone Proxy)
TLS
TLS
Geo-location
File
Geo-locationContacts
File
Contacts
1. Application calls Webinos Service discovery API to search geolocation service
2. User selects mobile’s geolocation service3. Application binds to selected service4. Application uses W3C Geolocation API to
access geolocation service
Rev PA3 2012-06-19 11
Webinos APIs, phase 2
Due August 31 2012 Updating phase 1 API specifications based
on:– Webinos Phase 1 implementation experiences– Progress in W3C standardization
New phase 2 APIs based on:– Additional use cases– Further Webinos development– Progress in W3C standardization
Rev PA3 2012-06-19 12
New proposed phase 2 APIs
Actuator API Telephone API Privacy aware Location and Proximity API Tethering API oAuth API Sensor API – pulse meter sensor type W3C Web Realtime communication
(getUserMedia and PeerConnection APIs)
Rev PA3 2012-06-19 13
More?
Audience is encouraged to consider and propose more APIs that need to be supported!
Rev PA3 2012-06-19 14
Investigating Web Intents for Webinos
• Service discovery/application launcher mechanism for web applications• ”Similar to Android Intents but for Web
Applications” Web Intents has strong momentum in
W3C Work in W3C on extending model to
support local network, e.g. UPnP, services
Rev PA3 2012-06-19 15
Demo of Web Intents for local network service discovery and access
Video player application supporting video play on remote UPnP media rendered discovered through Web Intents
Rev PA3 2012-06-19 16
SUPPORTING SLIDES FOLLOW..
THE SLIDES CONTAIN TABLES OF ALL APIS WITH DESCRIPTION AND RATIONALE FOR SPECIFYING THE API OR REUSING AN EXISTING API.
Rev PA3 2012-06-19 17
Introduction
Webinos API specifications are divided into the following categories:
Webinos base and generic objects/interfaces: Common interfaces for all Webinos APIs.
APIs for service discovery and remote API access: APIs to discover local and remote services.
HW Resources APIs: APIs allowing access to device HW resources such as GPS, camera, microphone, sensors, etc.
Application Data APIs: APIs allowing access to application capabilites such as contact items, calender information, messages, media files, etc.
Communication APIs: APIs allowing communication with other applications in the same or another device.
Application execution APIs: APIs allowing Webinos applications to launch other Webinos and native applications.
User profile and context APIs: APIs allowing access to user profile data and user context.
Security and Privacy APIs: APIs related to the security model for Webinos.
Rev PA3 2012-06-19 18
Access to capabilities on remote devices
Example: Access to Geolocation on remote device.
// 1. Initiate a search query for a service of the type geolocation
findHandle = window.webinos.discovery.findServices( {api:'http://www.w3.org/ns/api-perms/geolocation'}, {onFound:serviceFoundCB, onLost:serviceLostCB});
// 2. Bind to selected service
serviceHandle = service.bind({onBind:bindCB});
// 3. Use Geolocation API to access service
myLocationService.navigator.geolocation.getCurrentPosition(showMap);
Rev PA3 2012-06-19 19
APIs per category
API name Description Rationale
Webinos Core module
Basically it defined the Webinos namespace, i.e. the common interface from which all Webinos APIs can be accessed.
A specific Webinos namespace needs to be defined in order to not pollute the global namespace.
Webinos base and generic objects/interfaces
Rev PA3 2012-06-19 20
APIs per category
API name Description Rationale
Webinos Discovery module
Provides web applications with an API to discover local or remote services without any previous knowledge of the service. The API hides details of underlying low level discovery and communication protocols.
New API needed as existing low level Service Discovery mechanisms such as Bluetooth service discovery, Universal Plug & Play, mDNS, DNS Service Discovery, etc are not exposed to web application developers.
Discovery and access to remote services
Rev PA3 2012-06-19 21
APIs per category
API name Description Rationale
Webinos Sensor module
Generic access to data from sensors in the device, connected to the device or in another device. Webinos Service Discovery API used to find and bind to sensors and is agnostic to underlying low level methods for sensor discovery and communication with sensors.
New API needed as there was no existing generic sensor API that fulfilled the Webinos requirements, e.g. on sensor discovery.
Webinos TV Control module
Interface for TV control and management including channel management and display of TV streams that can be plugged into a HTML5 VideoElement .
New API needed as existing APIs did not fulfill Webinos requirements on embedding TV stream into a web page.
HW resource APIs
Rev PA3 2012-06-19 22
API name Description Rationale
Webinos Vehicle module
Provides access to specific vehicle data including trip computer data, gears or park sensors. Furthermore it offers methods for interacting with the on-board navigation system.
New API needed as there was no existing vehicle API for web applications and it was not feasible to extend an existing general system information/device status API.
Webinos NFC module
Supports read/write of identifier and/or the contents of an NFC tag.
New API needed as there was no existing NFC API for Web Applications, only Java or native APIs existed.
APIs per category
HW resource APIs
Rev PA3 2012-06-19 23
API name Description Rationale
W3C Geolocation API
Provides Web Applications with geographical location.
W3C API fulfills Webinos requirements.
W3C DeviceOrientation Event
Provides Web Applicatiions with information about the device orientation and motion
W3C API fulfills Webinos requirements.
W3C Media Capture
Provides access to the audio, image and video capture capabilities of the device. Note, only useful for capturing media files, doesn't give access to live streams.
W3C Media Capture was selected in favor of the more simple W3C HTML Media Capture API due to security and remote access reasons.
APIs per category
HW resource APIs
Rev PA3 2012-06-19 24
API name Description Rationale
WAC 2.0 devicestatus module
API for retrieving device status information such as battery status, network information and display properties.
Corresponding W3C APIs not yet mature.
Webinos Device Status Vocabulary
Vocabulary used by WAC 2.0 Device Status module. The WAC 2.0 devicestatus vocabulary has been extended with additional Webinos aspects.
WAC 2.0 Device Status module fulfills Webinos requirements but some new aspects need to be added to the vocabulary.
WAC deviceinteraction module
Provides a mechanism to interact with the end-user through features such as device vibrator, device notifier, screen backlight and device Wallpaper.
Corresponding W3C API not yet mature.
APIs per category
HW resource APIs
Rev PA3 2012-06-19 25
API name Description Rationale
Webinos Payment module
A generic and simple shopping basket based API that can be mapped to different underlying payment systems to provide a system that can address payments on platform bound payment solutions as well as open payment services.
New API needed as none of the existing solutions provided a sufficiently generic payment solution.
Webinos Messaging module
Extension of WAC 2.0 Messaging module. Supports sending messages through different technologies: SMS, MMS, Email and Instant Messages. Search for messages in the different folders. Subscribe for being notified upon incoming message events. Webinos extension is support for Instant Messages.
WAC API selected due to the availability of receiving messages, which currently is missing in the W3C Messaging API.
APIs per category
Application Data APIs
Rev PA3 2012-06-19 26
API name Description Rationale
W3C Contacts API
High-level API to read a user's unified address book.
W3C API fulfills Webinos requirements.
W3C Calendar API
High-level API to read a user's calendaring service.
W3C API fulfills Webinos requirements.
W3C File API An API for representing file objects in web applications, as well as programmatically selecting them and accessing their data.
W3C API fulfills Webinos requirements.
W3C File API: Writer
An API for writing to files from web applications.
W3C API fulfills Webinos requirements.
APIs per category
Application Data APIs
Rev PA3 2012-06-19 27
API name Description Rationale
W3C File API: Directories and System
An API to navigate file system hierarchies. W3C API fulfills Webinos requirements.
W3C Gallery API
Provides access to media gallery located on the device
W3C API fulfills Webinos requirements.
APIs per category
Application Data APIs
Rev PA3 2012-06-19 28
API name Description Rationale
Webinos Event Handling module
Provides means to exchange data in terms of events among addressable entities (e.g., applications, services), either locally or remotely.
A low level event handling API needed to send/receive/forward arbitrary data among any entity, in particular being suited for developing higher level APIs relying on data exchange featuring Webinos overlay networking and discovery.
APIs per category
Communication APIs
Rev PA3 2012-06-19 29
API name Description Rationale
Webinos Widget module
Defines the common widget interface. It is is based on W3C Widget Specifications and specifies webinos specific extensions, e.g. methods to put widgets in background and issue notifications to the user.
W3C Widgets speciifcations are established for installable web applications but Webinos needed to specifiy extensions to fulfill requirements.
Webinos AppLauncher module
Modelled after BONDI v1.1 AppLauncher API and modified by Webinos. Allows activation of webinos applications installed locally on the device.
Applications are identified differently in Webinos compared to Bondi.
APIs per category
Application Execution APIs
Rev PA3 2012-06-19 30
API name Description Rationale
Webinos Attestation module
Provides a secure method of querying the underlying device hardware to find out the identity and integrity of running software.
There was no existing API providing this functionality.
Webinos Authentication module
Provides information to applications about the current authentication status of users, as well as allowing applications to request re-authentication.
There was no existing API providing this functionality.
APIs per category
Security and Privacy APIs
Rev PA3 2012-06-19 31
API name Description Rationale
Webinos Userprofile module
Offers access to information on the user. The API is based on W3C Contacts API to gather basic information about the user (e.g. name, nickname, gender, birthday, etc.). Webinos extends it with social network attributes from Portablecontacts.
W3C Contacts API do not provide social network attributes.
APIs per category
User Profile and Context APIs
Rev PA3 2012-06-19 32
API name Description Rationale
Webinos Context module
Defines high-level interfaces to obtain access to a user's context data by two methods:• Executing a query against the context data storage and retrieving context data through the query results.• Subscribing to receive real time context data updates as soon as a context related event happens.
There was no existing API providing this functionality.
APIs per category
User Profile and Context APIs