Intent to Experiment: Web Share on Android

709 views
Skip to first unread message

Matt Giuca

unread,
Aug 26, 2016, 4:38:34 PM8/26/16
to blink-dev, Owen Campbell-Moore
Contact emails

Spec

Design doc

Summary
Web Share [1] is a proposed API for sharing data (text, URLs, images) from the web to an app of the user's choosing. In this first phase, we plan to implement website-to-native-app sharing in Chrome for Android.

In the Android version, a web page should be able to trigger a SEND intent. We later hope to allow websites to receive SEND intents using the Web Share Target API [2], but that will be dealt with in a separate proposal.

This project retreads old ground of Web Intents and Web Activities, but neither of those got any traction. We are starting with a very focused, one-way API for a single use case, and we have some good answers to the problems those systems encountered [3]. We have UX mocks for mobile [4].


Link to Intent to Implement discussion

Motivation
Websites are currently unable to trigger a generic "share" event to share text or URLs to a destination of the user's choosing. Users of Chrome on mobile are able to choose "Share" from the Chrome menu to share the current page URL to any native app, copy to clipboard, etc. However, from within the page itself, web developers' options are limited.

On Android, web pages can link to a special "intent://" URL [5] to send an intent, but this requires the web page to craft an intent in the Android intent URL syntax, which will never be supported on other platforms. Also, these intents are limited to apps that opt to receive the CATEGORY_BROWSABLE category (at the time of writing, very few). We could work to loosen this restriction, but we would prefer to build a platform-neutral API that can target native apps on a variety of platforms (as appropriate), as well as (eventually) web apps on all platforms.

Many websites today feature an array of social sharing buttons to share content to popular destinations like Facebook and Twitter, using services like ShareThis [6] and AddToAny [7]. This has two significant downsides: the destinations must be hand-picked by the site author (not the user), and the action cannot be sent to native apps (e.g., SMS tools or the native Facebook app). The Share API would allow sites to provide a generic "share" button that triggers the underlying platform's natural share mechanism.


Goals for experimentation
- Does it make sense to do this as an imperative API, or do developers prefer just a special URL scheme?
- What fields do developers want to put in the share object?

Experimental timeline
Change should go out in Chrome 55, and run for three cycles.

- 55 stable: December 6, 2016
- 56 stable: January 31, 2017
- 57 stable: mid-March, 2017
- 58 stable (experiment ends): end-April, 2017
* Stable dates are estimates: https://www.chromium.org/developers/calendar.

Any risks when the experiment finishes?
Sites in Chrome will lose the functionality, although as other browsers don’t support the API they have to deal with this case regardless. No data loss as the API does not have any persistent state.

Ongoing technical constraints
Parts of the Web Share implementation would assume certain OS-specific features such as Android intents. However, the API specification is not Android-specific; it is open-ended as to how the implementation should deliver the share event to the system.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
No (Android only, for now). Web Share has to be specifically implemented for each platform (because it is an OS interop mechanism), and we are starting with Android because there is an obvious mapping from Share to Android intents. We don't intend to ship until we have covered a wider set of platforms.

OWP launch tracking bug

Link to entry on the feature dashboard

Dimitri

unread,
Aug 30, 2016, 12:24:47 PM8/30/16
to blink-dev, owe...@chromium.org
LGTM.

Rick Byers

unread,
Sep 1, 2016, 7:53:00 PM9/1/16
to Dimitri, blink-dev, Owen Campbell-Moore
LGTM2

Do you have any particular customers considering trying this out and giving your feedback?  I'm excited to see what we'll learn!

Rick

On Tue, Aug 30, 2016 at 12:24 PM, Dimitri <dgla...@chromium.org> wrote:
LGTM.

Chris Harrelson

unread,
Sep 1, 2016, 9:02:28 PM9/1/16
to Rick Byers, Dimitri, blink-dev, Owen Campbell-Moore
LGTM3

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Matt Giuca

unread,
Sep 1, 2016, 9:38:44 PM9/1/16
to Chris Harrelson, Rick Byers, Dimitri, blink-dev, Owen Campbell-Moore
Thanks!

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

owe...@google.com

unread,
Sep 2, 2016, 2:34:33 PM9/2/16
to blink-dev, dgla...@chromium.org, owe...@chromium.org
We're working with 6-10 major websites who are all interested (details not yet public).

We're definitely excited to get their feedback!

Rick Byers

unread,
Sep 2, 2016, 4:25:13 PM9/2/16
to owe...@google.com, Owen Campbell-Moore, blink-dev, dgla...@chromium.org

Great, thank you Owen!  I can't wait to hear how this goes for them!

Matt Giuca

unread,
Mar 28, 2017, 3:55:16 AM3/28/17
to blink-dev, owe...@google.com, owe...@chromium.org, dgla...@chromium.org, rby...@google.com
An update on this.

We have been running the Web Share origin trial for two milestones (55 and 56). Here is the experiment report so far:

We will run in M57, then disable for the time being.

Matt

Owen Campbell-Moore

unread,
Mar 28, 2017, 12:30:55 PM3/28/17
to Matt Giuca, blink-dev, dgla...@chromium.org, rby...@google.com
Note for those skimming: we're excited about this API and plan to move ahead with it, but don't have the bandwidth this release. Will return with a new plan and updates ASAP.
Reply all
Reply to author
Forward
0 new messages