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

    Send notification locally from QT/C++/QML App.

    Scheduled Pinned Locked Moved Solved App Development
    47 Posts 4 Posters 2.7k Views 2 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.
      • pparentP Offline
        pparent @lduboeuf
        last edited by

        @lduboeuf said in Send notification locally from QT/C++/QML App.:

        congrats for your perseverance. Now you are in the perfect situation to update or create a documentation 🙂

        Thank's I will make better than this! 😉 I will update my QML notification module, and make a scripts that installs into an existing project all the prerequisites for it to work. Because there are some many tweaks to achieve it that it should not be done by a human, it's a loss of time, and the risk of mistake is too high. And anyway a script is always a more precise documentation on the actions to take than a human readable documentation.

        1 Reply Last reply Reply Quote 2
        • pparentP Offline
          pparent
          last edited by

          Ps: And by the way I also plan to make this whatsapp application way more usable than it was. The version currently on my repo, already include some improvements that make the app significantly more fluid, polished and usable. But I will keep improving it progressively, and I plan to fix all the major functionalities offered by whatsapp web, that are currently broken on the app (starting with downloading/uploading photos/videos). And also I guess that future upgrade to Qt6 will also be a leap forward in regards of performance of this app, given that the webengine will be significantly more modern.

          FuseteamF 1 Reply Last reply Reply Quote 1
          • KenedaK Keneda marked this topic as a question
          • KenedaK Keneda has marked this topic as solved
          • FuseteamF Offline
            Fuseteam @pparent
            last edited by

            @pparent if you are going to improve the app further, there is one more idea you can try; whatsapp web's service workers.

            If we can figure out the service workers, we can potentially get notifications even without being unsuspended

            pparentP 1 Reply Last reply Reply Quote 1
            • pparentP Offline
              pparent
              last edited by pparent

              ✔ My solution to the initial question:
              Here is my QML module to handle local notifications:

              https://github.com/pparent76/UbuntuTouch-qml-notify-module

              It contains a script setup-project.sh to install automatically all the requirements into the app project.


              Also this push request to the whatsweb app can be pretty informative:

              https://github.com/alefnode/ubports-apps/pull/44

              Especially this commit that corresponds to setting up the module with setup-project.sh:

              https://github.com/alefnode/ubports-apps/pull/44/commits/81d08baba14ed941ca0c9b246d0df543b0a452a6

              1 Reply Last reply Reply Quote 3
              • pparentP Offline
                pparent @Fuseteam
                last edited by

                @Fuseteam Seems out of my scope, and having notifications only when the app is on to me is not a real drawback, since it allows to get notifications only when you want, and quit the app otherwise.

                Also in my current version I made a tweak to hide the webview when the app is not in foreground to make sure it does not compute any visual stuff in the webview in background.

                In practice with this the battery usage seem very limited.

                FuseteamF 1 Reply Last reply Reply Quote 0
                • FuseteamF Offline
                  Fuseteam @pparent
                  last edited by

                  @pparent that's an interesting tweak— curious to see the effect

                  pparentP 1 Reply Last reply Reply Quote 0
                  • pparentP Offline
                    pparent @Fuseteam
                    last edited by pparent

                    @Fuseteam
                    You can always compile and test the current version of my repo:

                    https://github.com/pparent76/whatsweb

                    It already contains many improvements:

                    • Support for notifications
                    • Smoother navigation with transitions
                    • Smoother keyboard appearance/appearance
                    • Avoid opening the keyboard untimely, when navigating
                    • Enable GPU acceleration
                    • Hide left panel for more pleasant interface
                    • Make Emoji panel usable
                    • Better graphical integration of navigation buttons ( back in chatview )
                    • Copy a message to clipboard quickly with a long push on message.
                    • Screensaver when the app is not foreground: hide the webview to save battery
                    • Fix "contact info" panel
                    • Fix left menus.
                    1 Reply Last reply Reply Quote 1
                    • pparentP pparent has marked this topic as solved
                    • pparentP pparent referenced this topic
                    • First post
                      Last post