I have a PWA application where I check whether the application is in standalone mode(code snippet below) else prompt user with the Install Banner.
let windowNav: any = window.navigator;
if (window.matchMedia('(display-mode:standalone)').matches || windowNav.standalone) {
this.isStandAlone = true;
}
Recently, I have also created a TWA app for the same. Now when I install the APP from the playstore the below check fails though the app is in standalone mode. Is there a different way to check the standalone mode in TWA applications?Or a way to check that the APP is a TWA app?
Thanks