How to detect edge browser for android? quasar pwa issues



  • Hi everyone, i have a problem.
    i try to build a pwa in quasar, work fine, but in MS edge for android i have a problem width audio tag (play once). I try to detect this browser, but not work with q-platform detection. ¿any ideas?
    (Sorry for my english)
    Thanks



  • I can not detect samsung internet browser either. jaja.
    I think it’s important to be able to warn users if the PWA is not working well, right?



  • @Mandinga Why do not you use $ q.platform?
    There is a Platform.is.android

    https://quasar.dev/options/platform-detection


  • Admin

    Open up a Quasar app in Edge on your desired platform and console.log this.$q.platform Object.

    Example from a Win 10 with Edge when console.logging this.$q.platform.is:

    {
      edge: true,
      version: 18.17763,
      versionNumber: 18,
      win: true,
      desktop: true,
      name: 'edge',
      platform: 'win'
    }
    


  • Thanks to everyone for your replies.
    Dear patryckx: that is just the problem, since they behave different chrome and samsung internet when it comes to show the add to home screen, I need to differentiate them.
    With Edge it happens the same, it is disguised as chrome in android version.
    I will continue looking for solutions and I will publish them here.
    Thank you!



  • Dear Admin, as you well say, Edge is detected perfectly in windows, but in android, the detection points out:

    name: ‘Chrome’,
    platform: ‘Android’

    Regards!



  • I can confirm this bug. I’ll open an issue on GH



  • Hello! first I want to thank lucasfernog for bothering to solve this problem. Your solution to incorporate userAgent was great.
    I allow myself to give some details for those who need it:

    I guess we all want our PWA installed on users’ smartphones, and we know that 90% of the market is covered by Safari (ios) and Chrome (Android).
    With “beforeinstallprompt” we solve the banners of “Add to the home screen” (Android) and for safari with “Platform.is.safari”.
    The wonderful quasar also covers virtually all major browsers. But, in my opinion, there were two that were disguised as chrome, but they did not behave like this when it came to installing our PWA.

    One was Edge that, although it is not my preference, has more than 10,000,000 downloads only on Android.
    The other one is “Samsung Internet”, which has the same problem as Edge: It is detected as chrome, but it does not behave the same, so it is necessary to detect it and display a banner with the installation instructions.

    “Samsung Internet” is the default browser on “samsung galaxy” phones (which are not few) and now they have released this browser for all phones, which translates into more than 1,000,000,000 downloads in playstore. A more than important number.
    The solution of lucasfernog when using “userAgent” also solved the detection of “Samsung Internet” and, consequently, of many other browsers.
    Thanks again Lucas, and this is a giant step for the PWAs made with Quasar.

    Regards!


Log in to reply