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

    Notifications working, UBports is now my daily driver

    Scheduled Pinned Locked Moved OS
    2 Posts 1 Posters 1.3k 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.
      • V Offline
        vandys
        last edited by

        I just today finished coding up an alternative notification system; since I run my own message and notification server, I can do things like this. It uses a UDP-based protocol I cooked up, and I'll see how it holds up over a trip I'm taking for the next week. I have pop-up display, sound, and blinking LED for notifications. Reading the actual notifications is via a web interface.

        Anyway, anybody who's interested:
        https://github.com/vandys/webXMPP

        The files udp.py and notified.py are the main parts of this work. At its core the server handles being an XMPP client as a proxy on your behalf, it also talks SMS via a VoIP provider for SMS messaging.

        Andy

        1 Reply Last reply Reply Quote 4
        • V Offline
          vandys
          last edited by

          Update...

          During my trip, I had to switch back to my old phone due to a bug in the Python3 notification2 library. _closed_callback() was using an "nid" which wasn't in the notifications_registry any more. I coded some defensive logic and logging, and will see what's going on.

          But with that workaround, I have been able to daily drive my Nexus 5 for the second day now. I'm able to keep real time notifications with one 150 byte packet sent and received every 2.5 minutes. It lives fine behind NAT, and also seems fine with the transition from Wifi to mobile data and back.

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