determine if it's possible to launch service worker from external intent |
|||
Issue descriptionsee summary
,
Sep 18
,
Sep 20
I now realize now that I framed the question wrong. Sorry! For "picture share intents" we want to navigate the host browser. A service worker may or may not intercept that POST request. If the WebAPK is currently open, the share will clobber the page's current URL and navigate the main frame. I checked. Chrome supports opening a new tab from a "form submit". To launch a WebAPK with a POST URL, you need to pass different params to Tab#loadUrl() in WebappActivity#initializeUI() and WebappActivity#onNewIntent(). One code path is run if the WebAPK is already running when it gets an intent. The other is run if the WebAPK is not running when it got the intent. LoadUrlParams#createLoadHttpPostParams() looks useful. You still want to use PageTransition.AUTO_TOPLEVEL because it is more correct. One of the things that the page transition is used for is to determine whether to enable deep links for the navigation (in ExternalNavigationHandler.java) Someone from //chrome/browser/ui/OWNERS should know whether you need to set extra LoadUrlParams parameters. I hope that this helps
,
Sep 20
For the sake of completeness, I did notice weird behavior when going back to a page that I navigated to via POST for a test site I wrote. I did not notice the weird behavior when I tested using w3schools. I assume that the problem is with my test site and that the server on my dev box is not correctly set up.
,
Nov 29
implemented in https://chromium-review.googlesource.com/c/chromium/src/+/1271776 |
|||
►
Sign in to add a comment |
|||
Comment 1 by hartma...@chromium.org
, Sep 18