New issue
Advanced search Search tips

Issue 671947 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature



Sign in to add a comment

Unable to pre-install PWAs on managed enterprise devices

Reported by felix.ha...@gmail.com, Dec 7 2016

Issue description

Steps to reproduce the problem:
PWAs can be launched to fullscreen via an inlined intent uri. 
1) Take a working intent from another device, copy it to your device, launch
2) PWA won't launch because the org.chromium.chrome.browser.webapp_mac is unknown to the browser

OR

1) launch a standalone webapp via an inlined intent uri without adding org.chromium.chrome.browser.webapp_mac to the intent

What is the expected behavior?
It should be possible to pre-install and launch PWAs in a managed device setting mandating user involvement

What went wrong?
PWA won't start. Further details in the "An Aside: Provisioning a PWA home screen icon" section:
https://developer.zebra.com/community/android/android-forums/android-blogs/blog/2016/11/13/progressive-web-applications-in-the-enterprise 

and

http://stackoverflow.com/questions/29103192/start-chrome-as-web-app-on-android-start#30349889

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 54.0.2840.98  Channel: stable
OS Version: Android 4.4.x
Flash Version: 

we want to launch a standalone PWA via an inlined intent uri that was preinstalled to the device. the per-device token in org.chromium.chrome.browser.webapp_mac, which has to be added to the intent, forbids this.

we have a bunch of zebra devices (https://www.zebra.com) with a software called Enterprise Home Screen, which enables device provisioning, replaces the default android homescreen and adds enterprise stuff like user/admin roles and configurability. anyway, on this homescreen we can launch (web) apps via an inlined intent uri. we want to launch an app as a standalone webapp, same as the "add to homescreen" links do. 

webapps can be launched as standalone (no browser ui) via intent *once they have been added to the homescreen* by user interaction, i.e. clicking the "add to homescreen" popup or choosing this in the settings menu. chromium then generates a property named org.chromium.chrome.browser.webapp_mac for each web app as a security feature, so you can't launch any old url in standalone just by firing an intent. see: 
https://chromium.googlesource.com/chromium/src/+/3d6e847d28e399f4ae8cd879c7df1a3b3baa1e52/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
https://chromium.googlesource.com/chromium/src/+/3d6e847d28e399f4ae8cd879c7df1a3b3baa1e52/chrome/android/java/src/org/chromium/chrome/browser/WebappAuthenticator.java

this creates a problem in the enterprise use case: we can add a launcher with an inlined intent, but it would have to be a different webapp_mac for every single device (a couple hundred in total). the unique mac has to be a) created by chrome b) for each device, which makes this technically impossible.
 
Omitted word:

What is the expected behavior?
It should be possible to pre-install and launch PWAs in a managed device setting *without* mandating user involvement

Further investigation turned up this:
https://chromium.googlesource.com/chromium/src/+/2dd67964a3f0c7fb7cdf91bd5291e85625978d92%5E%21/

which still requires the org.chromium.chrome.browser.webapp_mac in the intent :(

Comment 3 by hanxi@chromium.org, Dec 7 2016

#2 was the initial CL, and things changed a lot since then. Now we don't need the mac to launch a WebAPK, since WebAPK is verified by whether it's been signed by the correct signature. A WebAPK (installed Web apps) can be launched as any other native app (https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/infobar/AppBannerInfoBarDelegateAndroid.java?rcl=0&l=158). Only one concern for your cases is: WebAPKs don't provide any sync mechanism crossing devices. On each devices, user needs to install them through Chrome again since they are real Android apps.
From what I've seen, WebAPKs feel like the missing link between packaged apps and web apps. The truth is still what's on the server and the app autoupdates from the manifest, so in that regards it's a decentralized app store.
On the device, the apps feel like proper apps. But from a developer's perspective, the heavyweight native/packaged app release cycle sort of break with continuous deployment pratices learned from the web.
Long story short: If only there were a way to script the APK creation, that'd rock! :)

Comment 5 by martin.f...@svt.se, Jul 7 2017

@hanxi I came here to report what you mention in your comment: "WebAPKs don't provide any sync mechanism crossing devices." Shouldn't that be considered a bug? I just got a new phone and was surprised to see that after syncing all my apps, the PWAs I had added to the home screen where suddenly only working as normal bookmarks, i.e. opening the page in the browser with the normal browser chrome. While that makes them still largely functional, I had expected them to work just like on the old device.
Labels: -Type-Bug Needs-triage-Mobile Triaged-Mobile Type-Feature
Assuming this issue as Feature Request and updating it accordingly.
Components: Mobile>WebAPKs

Sign in to add a comment