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.
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>')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With