Determine best solution for Trusted Web activity cache pre-warming upon APK install |
||
Issue descriptionSome developers have told us they want to be able to preinstall their APK onto a device and have it work when opened for the first time even when offline Worth talking about ways to address. My current thinking is that some fancy web packaging solution may be able to solve this, else we may be able to have Chrome listen for new apps installed (or scan installed apps) and somehow communicate with them to determine whether they use a TWA and what the SW to install would be. This seems difficult, but worth exploring at least.
,
Feb 27 2018
Ya, when we last talked about this we had planned to use WebPackaging. There were two issues: 1) it wasn't ready yet but I think it's been chugging along as AMP is planning to do stuff with it 2) there was an expiry time associated with packages that was concerning in the context of putting package in an app that's posted to play store but may only be downloaded weeks/months later. The alternative of having chrome listen has numerous challenges too. E.g. do all browsers go and do the same work to fetch the package when each of them sees the install happen? How do you mediate? Also, you mentioned "preinstalls" which definitely isn't about listening and would have to poll installed apps. Even if it was just for installs from play, chrome may not be running at the time (and won't get woken up on O+) so would have to try and detect it in subsequent launches. None of these are deal breakers but it's got quirks :/
,
May 18 2018
The following revision refers to this bug: https://chromium.googlesource.com/custom-tabs-client/+/bd0bd8af3755f0941c766403c4603a1d8d2ef0f4 commit bd0bd8af3755f0941c766403c4603a1d8d2ef0f4 Author: Peter E Conn <peconn@chromium.org> Date: Fri May 18 13:06:24 2018 🤝 Add extras key for relationship validation callback. Bug: 816798 Change-Id: I26581a464cbf0228cc40dbb7939169997048d37f Reviewed-on: https://chromium-review.googlesource.com/1065875 Reviewed-by: Benoit L <lizeb@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Commit-Queue: Peter Conn <peconn@chromium.org> [modify] https://crrev.com/bd0bd8af3755f0941c766403c4603a1d8d2ef0f4/customtabs/src/android/support/customtabs/CustomTabsCallback.java
,
May 21 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b4ecde049e676cc9b59c67736af19765c7a28d7 commit 2b4ecde049e676cc9b59c67736af19765c7a28d7 Author: Peter E Conn <peconn@chromium.org> Date: Mon May 21 10:01:03 2018 🤝 Include connectivity status in verification result. This also rolls custom-tabs-client, including the following changes (only the most recent is directly depended upon): https://chromium-review.googlesource.com/c/custom-tabs-client/+/1028234 https://chromium-review.googlesource.com/c/custom-tabs-client/+/1063970 https://chromium-review.googlesource.com/c/custom-tabs-client/+/1065875 Bug: 816798 Change-Id: I3ec9bdcb658af5a30ea8d09f5603b56441f7f367 Reviewed-on: https://chromium-review.googlesource.com/1064236 Commit-Queue: Peter Conn <peconn@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Cr-Commit-Position: refs/heads/master@{#560255} [modify] https://crrev.com/2b4ecde049e676cc9b59c67736af19765c7a28d7/DEPS [modify] https://crrev.com/2b4ecde049e676cc9b59c67736af19765c7a28d7/chrome/android/java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java [modify] https://crrev.com/2b4ecde049e676cc9b59c67736af19765c7a28d7/chrome/android/java/src/org/chromium/chrome/browser/browserservices/PostMessageHandler.java [modify] https://crrev.com/2b4ecde049e676cc9b59c67736af19765c7a28d7/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java [modify] https://crrev.com/2b4ecde049e676cc9b59c67736af19765c7a28d7/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java [modify] https://crrev.com/2b4ecde049e676cc9b59c67736af19765c7a28d7/chrome/android/javatests/src/org/chromium/chrome/browser/browserservices/OriginVerifierTest.java
,
May 22 2018
The above changes give a TWA a way to notice that it has been started offline. I'm not sure if we want to go further than this.
,
Jan 10
A less technical solution could be to provide documentation & sample code to help novice developers catch and handle this condition in the Android app. This would address the case of teams that have no Android developers on staff. Teams which have a full time Android developer should have no problem building a custom solution that meets their needs. |
||
►
Sign in to add a comment |
||
Comment 1 by owe...@chromium.org
, Feb 27 2018Labels: -Type-Bug Type-Feature