This specification defines an Application Programming Interface (API) for that provides lauching application in device.
This document represents the early consensus of the group on the scope and features of the proposed Application launcher API. Issues and editors note in the document highlight some of the points on which the group is still working and would particularly like to get feedback.
W3C application launcher API provides interface for invoking the native applications such as messaging, telephony and installed applications. An installed native application can be launched based on scheme of the standard URI Generic Syntax [[!URI]]. The following example URIs illustrate several URI schemes for application laucher API.
Need to clarification. What is the minimum supported URI scheme and their native applications? mmsto, sip, file, and etc .
Need to develop the more requirements based on Use Cases.
The following requirements for application launcher API have been expressed. The requirements for this set of interfaces may moved in the Device API Requirements document [[DAP-REQS]].
The following code extracts illustrate how to work with a application launcher API in the device:
Further examples are required to give better understanding concerning the overall functions of the application launcher API.
Define the success and error callback, and get the default application for application/pdf mime type, change the default application of it, and launch application.
// Define the success callback for the getDefaultApplication method. function appSuccessCB(applications) { //do something with resulting applications for(var i in application) alert(navigator.service.applicationManager.isDefaultApplication(application[i]); //... } // Define the success callback for the setDefaultApplication method function defaultAppSuccessCB(response) { alert( "The default application has successfully changed"); } // Define the error callback. function appErrorCB(response) { alert( "The following error: " + response.code + ", occurred launching an application"); } // Get the default application for the application/pdf mime type. navigator.service.applicationManager.getDefaultApplication('application/pdf', appSuccessCB, appErrorCB); // Change the default application for the application/pdf mime type. navigator.service.applicationManager.setDefaultApplication('application/pdf', defaultAppSuccessCB, appErrorCB); // Define the data object var data = navigator.service.applicationManager.createData(uri:'http://www.w3.org/2009/dap/applauncher.pdf', mimeType:'application/pdf'}); // launch an application navigator.service.applicationLauncher.launchApplication(data, appErrorCB);
This section is under development.
The API defined in this specification can be used to launch the application on device. This information can potentially compromise user privacy and a conforming implementation of this specification MUST provide a mechanism that protects the user's privacy and this mechanism should ensure that such operations MUST be authenticated.
A conforming implementation of this specification MUST provide a mechanism that protects the user's privacy and this mechanism SHOULD ensure that privacy information is not revealed without user's informed consent.
This section is under development.
ApplicationLauncher
interfaceThe ApplicationLauncher
interface offers methods concerned with launching applications on the device.
Data
interfaceThe Data
interface contains URI and mime type of the data.
Application
interfaceThe Application
interface captures various information of the application which is installed on the device.
ApplicationManager
interfacesetDefaultApplication can cause security problems since the method can affect the configuration of the OS to be changed.
The ApplicationManager
interface offers methods that manages application in the device.
AppSuccessCB
interfaceThe AppSuccessCB
lists the applications in the device.
AppErrorCB
interfaceAppError
interfaceAdd Application Launcher API specific error codes...
The AppError
interface encapsulates all errors in the manipulation of Application
objects in the Application Launcher API.
The API described in this document took inspiration from the following documents:
This is a list of features that have been discussed with respect to this version of the API but for which it has been decided that if they are included it will be in a future revision.
...