New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 761007 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature

Blocked on:
issue 788191



Sign in to add a comment

Add support for WebShareTarget for WebApks

Project Member Reported by yfried...@chromium.org, Aug 31 2017

Issue description

Cc: -pkotw...@chromium.org yfried...@chromium.org
Owner: pkotw...@chromium.org
Summary: Add support for WebShareTarget for WebApks (was: Add support for WebShareTarget experimentation for WebApks)
Peter's going to pick this up since I'll be out for the next 2 weeks
Note: I'll be out for the next 5 weeks so won't be able to review. I'll try to mail you a spec draft before then.
Spec draft is up:

https://wicg.github.io/web-share-target/

Please let me know if there's anything in there you think should be changed. Otherwise, please try to stick to what's specified there (since that should closely match our implementation on Desktop).

Note that the Desktop implementation is here:
https://cs.chromium.org/chromium/src/chrome/browser/webshare/share_service_impl.cc
One thing that's absent and which we discussed with you was how to specify multiple share targets? I thought we discussed share_target optionally being an array of dictionaries and you said there was some typical spec way of capturing this (i.e. if only one, can use dictionary, else use array of dict - or something to that effect?)
#4 I was planning to not support that initially and see if there is demand for it.

Allowing multiple share targets introduces significant complexity:
- You need to allow for more than one in the manifest (that part is easy, and we can extend into it later).
- You need to deal with the fact that different platforms will support a different maximum number of share targets, and provide some way for apps to prioritize them and deal with the fact that some may be missing.
- You need to provide additional meta-data such as a name, and possibly icon, for each share target.
- You need to deal with the spoofing concern of apps naming their share targets after some other app. (Whereas if we have only one share target named after the app, we would always show the installed name of the app which the user got to see when they installed it.)

So I would like to just have a single share target for now, with the option of extending later.
I've opened an issue on https://github.com/WICG/web-share-target/issues/23 and pasted this discussion there.
Ok, sounds reasonable. Thanks for posting that - let's see
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/726ac7d4d6d52ecae817743fd104cab78420c22c

commit 726ac7d4d6d52ecae817743fd104cab78420c22c
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Sun Nov 05 22:22:02 2017

[WebApk] Add initial support for WebShareTarget.

Adds the scaffolding to WebApk's main intent handling for
WebShareTarget.  Introduces a new launch type to track these metrics.
Primarily supports a {text} template variable as is typical for 
Android share events. Also supports {title} stemming from Intent.EXTRA_SUBJECT
for compatibility with WebShare

{url} as mentioned in the spec and any other {...} will be replaced by empty text.

Note: this a no-op as it is written since the conditional fields are
defaulted to off and unsupported on the server.

BUG= 761007 

Change-Id: I4f589034488771187341d4817708753ff74cc1b8
Reviewed-on: https://chromium-review.googlesource.com/734944
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514070}
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkConstants.java
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/libs/common/src/org/chromium/webapk/lib/common/WebApkMetaDataKeys.java
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/AndroidManifest.xml
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/BUILD.gn
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/bound_manifest_config.json
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/proguard.flags
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/shell_apk_version.gni
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/HostBrowserLauncher.java
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/MainActivity.java
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ShareActivity.java
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ShareActivity0.java
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ShareActivity1.java
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ShareActivity2.java
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ShareActivity3.java
[add] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/ShareActivity4.java
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/chrome/browser/android/shortcut_info.h
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/tools/android/checkstyle/chromium-style-5.0.xml
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/tools/android/checkstyle/suppressions.xml
[modify] https://crrev.com/726ac7d4d6d52ecae817743fd104cab78420c22c/tools/metrics/histograms/enums.xml

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b0b11fc694f03b9a3609211f9e4aa9232bccc585

commit b0b11fc694f03b9a3609211f9e4aa9232bccc585
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Mon Nov 06 17:10:38 2017

[Android WebAPK] Fix isLaunchedFromHomescreen() for WEBAPK_SHARE_TARGET

This CL fixes WebappInfo#isLaunchedFromHomescreen() when a WebAPK is launched
as a result of a share intent.

BUG= 761007 

Change-Id: I9653489255a8fb0bdbca5c58da4118dd28e33055
Reviewed-on: https://chromium-review.googlesource.com/754722
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#514157}
[modify] https://crrev.com/b0b11fc694f03b9a3609211f9e4aa9232bccc585/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 10 2017

Blockedon: 788191
Labels: -M-63 M-71
Status: Fixed (was: Started)
V1 of the spec is implemented and live in canary

Sign in to add a comment