Samsung Electronics logo

Application Control



The application control allows you to launch other applications whose functionalities you need in your application. Basically, launching an application control means that if you need an application that provides certain functionality, you can request that the system launches it according to your requirements. The application control allows you to launch applications without knowing their identifiers or specifications, based on your immediate needs.

When the system gets an application control request, it finds the proper control provider application, and launches it. Once the provider application has performed the requested task, it must pass control back to the requesting application with the result of the operation it has provided. To do this, the provider application calls the getRequestedAppControl() method of the Application interface to get the reference of the RequestedApplicationControl object that has been passed to it with the control request. Then, the provider application calls either the replyResult() method (in case of success) or the replyFailure() method (in case of failure) of the RequestedApplicationControl interface to return the control back to the requesting application. The result of the provided operation (if any), is delivered as an array of ApplicationControlData objects. The result is received in the original calling application through the ApplicationControlDataArrayReplyCallback event handler.

There are different types of application control requests:

The following attributes are used to resolve which application is launched:

The system compares the attributes of the control request against the installed applications to determine which of the available applications is most suitable for the control request. The control request is resolved only if all specified information matches the service descriptions retrieved from the installed applications. The application control data attribute is not used in resolving the control request.

To allow other applications to use the functionalities of your application (basically, to allow the system to launch your application based on a request from another application), you can define 1 or more application service descriptions in the config.xml file. Each service description specifies the operation, URI scheme, and MIME type of the application control service your application can offer:

<sec:app-control>
   <src name="[PAGE]"/>
   <operation name="[OPERATION]"/>
   <uri name="[URI_SCHEME]"/>
   <mime name="[MIME_TYPE]"/>
</sec:app-control>

The src attribute is the application page (usually an HTML file) that handles the request.The operation is mandatory attribute, while the scheme and mime attributes are optional. If the scheme attribute is file, the attribute can be left out.

Base Application Controls

Samsung Web API provides base applications, such as Web browser, image viewer, music player, and video player. Using the ApplicationControl interface, you can easily use the functionality of the applications. The following table lists the services provided by the Samsung Web applications.

Table: Samsung Web application services
Service Operation Scheme MIME
Browsing a Web page http://samsungapps.com/appcontrol/operation/view
  • http
  • https
-
Selecting a file http://samsungapps.com/appcontrol/operation/pick file
  • */*
  • image/*
  • video/*
  • audio/*
Displaying an image http://samsungapps.com/appcontrol/operation/view
  • file
  • http
  • https
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
Playing a video file file
  • video/mp4
  • video/3gp
Playing a sound file
  • audio/aac
  • audio/amr
  • audio/mp3
  • audio/wav
  • audio/ogg
Note
Samsung Web API provides support for the defined MIME types of the base application services depending on the platform implementation.