6

How can one distinguish between an Android Trusted Web Activity (PWA wrapped in a WebView) and a Progressive Web App that has been added to the home screen (fullscreen mode)?

Is it possible in JS or CSS or even HTML5?

Edit: People are asking me what the differences are between a TWA and a PWA. I believe explaining this here is beyond the scope of this question. Please correct me if I'm wrong.

Chris
  • 1,597
  • 4
  • 18
  • 26

1 Answers1

1

I found the answer here: How can I detect if my website is opened inside a Trusted Web Actvity?

The question is formulated a bit differently, but it solves my problem as well. In short:

document.referrer.includes('android-app://<twa.package.name>')
Chris
  • 1,597
  • 4
  • 18
  • 26