Confirmed users
247
edits
(add 'similar work' section) |
m (Fixed spelling errors) |
||
Line 3: | Line 3: | ||
An application wants to send or get information with another application. For example, some communications related applications (Skype, SMS, dialer) could send communication logs to a logging ''service'' that would then show the log of all communications to the user. Otherwise, an application might want to know which music is currently playing and get this information from a music player. | An application wants to send or get information with another application. For example, some communications related applications (Skype, SMS, dialer) could send communication logs to a logging ''service'' that would then show the log of all communications to the user. Otherwise, an application might want to know which music is currently playing and get this information from a music player. | ||
As for Web Activities, the idea is that an application will interact with another application. They will be put in relation | As for Web Activities, the idea is that an application will interact with another application. They will be put in relation through a keyword. Regarding semantic, the main difference with Web Activity is that the interaction is not about delegating an action but about communicating. There is no caller/handler relationship. The relationship is actually 1:n while Web Activity is limited to a 1:1 relationship. Regarding user interaction, the main difference with Web Activity is that the other application will not be shown to perform a task, the entire process will happen in the background. | ||
This API is only there to create a bridge between two applications. The only intended UI is for security reasons, to select communication peers. | This API is only there to create a bridge between two applications. The only intended UI is for security reasons, to select communication peers. | ||
Line 77: | Line 77: | ||
== Accept a connection request == | == Accept a connection request == | ||
Only applications that have been previously selected by the user (when ''registerConnections'' is called) will get a connection request. Those applications will still be able to reject or accept the connection request. Accepting the connection has to be done | Only applications that have been previously selected by the user (when ''registerConnections'' is called) will get a connection request. Those applications will still be able to reject or accept the connection request. Accepting the connection has to be done explicitly by the receiver by calling ''accept()'' on the received object. Not calling ''accept()'' will implicitly reject the connection request. | ||
var port = null; | var port = null; | ||
navigator.setMessageHandler('connect', function(request) { | navigator.setMessageHandler('connect', function(request) { |