Skip to first unread message

Kenny Debrauwer

Nov 20, 2011, 7:28:39 AM11/20/11
to Web Intents

I was at Devoxx 2011 in Antwerp, Belgium and I was present in the
conference about Web Intents. I asked the question about having the
ability to specify validation in the webintents and was told to post
the idea here. So here we go. :-)

Our situation : We currently work with our own inhouse built CMS which
contains a basic image editor, it would be a great addition to be able
to give the user the option to edit his/her images in a more advanced
application using Web Intents. In our CMS we mostly specify what size
the image has to be and we validate those images when saving the page
(after editing the image). I think it would be a great addition if
this validation could be part of the Web Intent for editing images.

This is what I had in mind :


This way you can inform the editing application that the returned
image has to be of that size. Because not all 3rd parties will likely
implement this of have this ability, a certain value in the callback
could be added to inform if the image has been validated by the
specified parameters or not. Or when specifiying the application
supports Web Intents, have a parameter that informs the browser the
application supports image validation.

Possible other parameters to validation on : aspect-ratio, min-width,
min-height, max-width, max-height

Kenny Debrauwer

Paul Kinlan

Nov 20, 2011, 8:54:47 AM11/20/11
Hi Kenny,

Thanks for coming to the talk and for asking the question here.  I can certainly see the value in the concept, for instance the Twitter Android app will only accept images less than 5MB (if I remember correctly), so I might want to do something similar and not even let the user get to the point of even seeing my app in the picker.

My main concerns with this are:
  1. It is very specific to images, it would need a more general syntax to apply to other data-types as well.
  2. The user might not know that the action they are performing and the app they want to use has a data constraint, in which case they will be confused by the lack of presence of their app in the selection list.
  3. If we have to process the data to check that it meets the constraints, how do we do that with a Word File, or a more obscure data format?
  4. How can this be handled when we just pass URL's between the client and the service? For example if I share a link to an image, and it my app has specified some constraints on that image - is it the picker that validates it so that it is not even presented to the user if the constraints don't match, or is it the client application?  If it is the client application then these constraints won't work because we are already in the app, if it is the browser in the intent picker section then the browser will have to download the entire image - which is a bad thing.
The easier route might be for the client application that has launched to do it's own checks and if it fails it simply calls postException instead of postResult - this way we can indicate that there was an issue with the action the user tried to complete and they should try it again.  And I think this would apply to your CMS Image editor too.

The other side of the coin, is if the image editor makes the image larger than you expect in return - in this case I am not even sure what to do other than throw your own validation warning up to the user that what they have just is outside the constraints of your app.

Paul Kinlan
Developer Advocate @ Google for Chrome and HTML5
Reply all
Reply to author
0 new messages