UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Intercept html5 browser notifications in webapp?

    Scheduled Pinned Locked Moved App Development
    6 Posts 3 Posters 476 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • poVoqP Offline
        poVoq
        last edited by

        I am wondering it it might be possible to add HTML5 browser notifications to Morph or intercept them from a QML app similar to how @kugiigi does it with custom notifications in the Pesbuk app.

        I am aware that this would only work with background suspension being disabled, but maybe if support for it was added to Morph this could be made to bypass this limitation for all Morph using applications?

        A quick search resulted in this thread that seems to indicate that the notifications can be intercepted with Javascript:
        https://stackoverflow.com/questions/57523910/intercept-html5-web-notifications-in-a-browser-environment

        Any ideas or suggestions?

        Fairphone 5 (waiting for port)

        1 Reply Last reply Reply Quote 0
        • D Offline
          danqo6
          last edited by

          Chris Clime started working on something, look here https://github.com/ubports/morph-browser/tree/xenial_-_notifications

          1 Reply Last reply Reply Quote 1
          • poVoqP Offline
            poVoq
            last edited by

            That looks awesome, but it might actually be real webpush notifications?

            Fairphone 5 (waiting for port)

            dobeyD 1 Reply Last reply Reply Quote 0
            • dobeyD Offline
              dobey @poVoq
              last edited by

              @poVoq Real web push integration for the browser would indeed be the correct/best general solution for notifications here.

              1 Reply Last reply Reply Quote 0
              • poVoqP Offline
                poVoq
                last edited by

                Of course that would be awesome/best, but real web push is not supported by many website and HTML5 apps, thus what I am originally asking for is a workaround using the desktop notifications that are much more widely supported.

                Fairphone 5 (waiting for port)

                1 Reply Last reply Reply Quote 1
                • poVoqP Offline
                  poVoq
                  last edited by poVoq

                  Has anyone tried this: https://github.com/balcy/example-webcontainer-notifications

                  It looks a exactly like what I have in mind...
                  Edit: Tested it, but it currently doesn't seem to work?
                  Edit2: The HTML5 notification tester website in general doesn't seem to work on Morph 😞
                  Edit3: Confirmed by developer that this also needs the xenial_notifications branch of Morph. Lets hope that it will be merged upstream soon 🙂 Keeping my fingers crossed for OTA15.

                  Fairphone 5 (waiting for port)

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post