-
Notifications
You must be signed in to change notification settings - Fork 235
Description
Is your feature request related to a problem? Please describe.
It is not entirely straightforward to detect whether a user is using a WebView-fallback, especially if the application is replacing an older WebView-based application, or to differentiate from users opening the website in a third-party WebView-sandbox app.
Describe the solution you'd like
We would like to be able to append the WebView's User-Agent with app-information, such as "MyTwaApplication/12.5.2" through the Bubblewrap-manifest:
{
...
"userAgentSuffix": "MyTwaApplication/12",
...
}
or preferably with templating for app version (which is already in the manifest):
{
...
"appVersionName": "12",
"userAgentSuffix": "MyTwaApplication/{appVersionName}",
...
}
or something similar.
Describe alternatives you've considered
We have considered attempting to detect WebView using the normal user-agent, which would not provide version-information.
An alternative for version might be the launch-url, but that seems to be error-prone and only limited to the initial load.
Additional context
This is related to another issue I have created. I will update with the issue-number in a moment.
Edit: Issue #924