Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

Add support for Web Share API #3486

Closed
NotWoods opened this issue Jun 19, 2019 · 2 comments
Closed

Add support for Web Share API #3486

NotWoods opened this issue Jun 19, 2019 · 2 comments
Labels
blocked Blocked pull requests and issues E13 Estimation points: 13 <engine-gecko> Component: browser-engine-gecko 🌟 feature New functionality and improvements needs:gv To implement/fix this we need a new API in GeckoView <pwa> Component: feature-pwa
Milestone

Comments

@NotWoods
Copy link
Contributor

NotWoods commented Jun 19, 2019

GeckoView will be adding a delegate for the Web Share API, which we should handle to show a native sharing prompt.

The delegate API is expected to pass data corresponding to parts of the Web Share API:

  • title: optional string
  • text: optional string
  • url: optional URL string
  • files: optional list of URIs representing files to share

At least one of those values will be defined.

The delegate API is expected to have the following callbacks:

  • onDismiss: when the share panel is dismissed or an error occurs, this will tell GeckoView to send an AbortError to the web app.
  • onSuccess: when the share is complete, this will tell GeckoView to resolve the share promise.

Steps that the implementation should take:

  1. If there are no share targets available, call onDismiss and abort these steps.
  2. Present the user with a choice of one or more share targets, selected at the user agent's discretion. The user MUST be given the option to cancel rather than choosing any of the share targets (done by native share UI). Wait for the user's choice.
  3. If the user chose to cancel the share operation, call onDismiss and abort these steps.
  4. Activate the chosen share target, convert data to a format suitable for ingestion into the target, and transmit the converted data to the target. If an error occurs starting the target or transmitting the data, call onDismiss and abort these steps.
  5. Once the data has been successfully transmitted to the target, call onSuccess.

Spec: https://wicg.github.io/web-share/level-2/
GeckoView Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1557039

┆Issue is synchronized with this Jira Task

@NotWoods NotWoods added the <pwa> Component: feature-pwa label Jun 19, 2019
@NotWoods NotWoods self-assigned this Jun 19, 2019
@pocmo pocmo added <engine-gecko> Component: browser-engine-gecko 🌟 feature New functionality and improvements blocked Blocked pull requests and issues labels Jun 25, 2019
@bifleming bifleming added the needs:gv To implement/fix this we need a new API in GeckoView label Jun 25, 2019
@NotWoods NotWoods removed their assignment Jul 9, 2019
@cpeterso
Copy link
Contributor

The GV bug is assigned to Dylan for Q3, but work has stalled because there are higher priority GV bugs.

https://bugzilla.mozilla.org/show_bug.cgi?id=1402369

@cpeterso
Copy link
Contributor

cpeterso commented Sep 4, 2019

GV team plans to land the WebShare API in September (GV 71 Nightly): https://bugzilla.mozilla.org/show_bug.cgi?id=1402369

@NotWoods NotWoods added the E13 Estimation points: 13 label Oct 14, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Oct 31, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Nov 2, 2019
NotWoods added a commit to NotWoods/android-components that referenced this issue Nov 2, 2019
bors bot pushed a commit that referenced this issue Nov 4, 2019
4919: Closes #3486 - Implement Web Share API r=Amejia481 a=NotWoods

ShareData is a separate data class so that Web Share Target can use it down the line.



Co-authored-by: Tiger Oakes <toakes@mozilla.com>
@bors bors bot closed this as completed in 85ecc9b Nov 4, 2019
psymoon pushed a commit to psymoon/android-components that referenced this issue Nov 6, 2019
calvin-li pushed a commit to calvin-li/android-components that referenced this issue Nov 8, 2019
espertus pushed a commit to espertus/android-components that referenced this issue Nov 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked Blocked pull requests and issues E13 Estimation points: 13 <engine-gecko> Component: browser-engine-gecko 🌟 feature New functionality and improvements needs:gv To implement/fix this we need a new API in GeckoView <pwa> Component: feature-pwa
Projects
None yet
Development

No branches or pull requests

5 participants