Do you mean ActivityHandlerDescription here? Can you give an example of
these?
> bool isActivityHandlerRegistered(ActivityHandler handler);
> };
>
> ** Handling an activity **
>
> Handling activities will be done trough System Message Handler. An
> |ActivityHandlerRequest| will be passed in the Message.
>
> ** Launch an activity **
>
> var a = new Activity({ name: "view", data: { type: "image/png", uri: ...
> }});
> a.onsuccess = function() {};
> a.onerror = function() {};
>
> ** More information about ActivityOptions **
>
> Activities are defined with a name and some data. Those data can be
> stuff like the image to send, the type of the object or anything the
> activity will require. Activities with a specific name should have
> specific data the handlers will expect to see.
> That means the initial specification should specify some basic
> activities.
>
> ** More information about ActivityHandlerDescription **
>
> Most of it is quite self-explanatory.
> - href: can be used to register an activity handler in another page.
> - disposition: could be window or inline for the moment.
> - returnValue: the UA might want to know if the activity will return a
> value. For the basic activities (view, edit, etc.) the UA knows that but
> we need that at least for proprietary activities.
>
I think there might be value in building in the concept of singular and
plural return values. It is possible that a UA could aggregate return
values from multiple sources, for instance, or that you could promote and
demote activities that provide something different than what is provided.
For instance, a camera service might only be setup to provide one image at
a time (i.e., it has no "return this picture and take another" option),
while a service like Flickr could support multiple return values easily.
But for a consumer both are probably okay. Also, types aren't easily
pluralized (i.e., there's no list-of-images mimetype), and this could avoid
a proliferation of plural-vs-singular Activity names.
Also, should the caller declare if they are expecting a return value or
not? If you have this property during registration, that means that some
Activity providers could declare a returnValue and some may not.
An example of a case that might be vague: one can imagine that the "share"
activity might return the URL of the shared item. Or, it might not. The
Activity provider could still, of course, return an invalid or vague URL
(to preserve a sort of sharing anonymity), but it seems like we're making a
stronger distinction here. If an activity has no return value does that
mean that there's no indication when or if it completes?
> - filters: this object should mirror |data| from ActivityOptions but the
> values for each fields can be an Array of string, a string or a regexp.
> An activity will be considered as able to handle an activity only if the
> filters are all satisfied. An array means OR for each items. If there is
> no filter value for a field, that means it is always satisfied.
>
One example I've thought about is unknown data during invocation. For
example, I'd like if we avoided type: "text/uri-list" (which is present in
many Web Intent examples), and instead distinguish between concrete data
and a pointer to data – so if you share something, you'd do {data: {type:
"text/html", uri: "
http://some-fun-site.com"}} – with type referring to the
resource on the other side of that URL. But sometimes you don't know the
actual type of a URL, so it might be nice if you could say {data: {type:
"*", uri: "..."}}, and then the filter wouldn't be invoked (i.e., filters
would understand "*"). Though "*" might not be the best way to indicate
unknown. Null?