• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
GUI-O Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login

Announcing IoT push notifications

Scheduled Pinned Locked Moved
Announcements
2
32
3.0k
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.
  • K
    kl3m3n
    last edited by kl3m3n 6 Jun 2022, 14:30 29 May 2022, 12:06

    GUI-O app version 1.0.3 now supports push notifications. Please check IoT push notifications section in the new developer manual (download it from https://www.gui-o.com/).

    Important notes (for more info, see developer manual):

    • The "Application UUID" changes if the application is re-installed, or if the application data is deleted. Updating the application does not change the "Application UUID"

    • In idle mode, the foreground service consumes minor amounts of data. The user is notified about the approximate data usage, when this feature is enabled

    • The service can be killed by the host operating system. It is therefore necessary to disable any battery (and similar) optimizations. The user is notified about this, when this feature is enabled. Some Android vendors prefer battery life over proper app functionality (check https://dontkillmyapp.com/ for a possible workaround)

    1 Reply Last reply Reply Quote 0
    • K
      kl3m3n
      last edited by kl3m3n 30 May 2022, 17:39

      Please check out the instructions and example code at:

      https://www.gui-o.com/examples

      or

      https://www.gui-o.com/examples#h.m32xlxsbye05

      BR,
      kl3m3n

      S 1 Reply Last reply 30 May 2022, 19:22 Reply Quote 0
      • S
        Sato @kl3m3n
        last edited by 30 May 2022, 19:22

        Hi @kl3m3n,

        First of all, congratulations for the good work, it is very useful

        I am doing tests, the ESP32 sends a notification every 20 seconds, it works fine, but after a while it stops working, my phone freezes as well as the Gui-O, that one, then doesn't open and shows the screen in black

        What could I be doing wrong?

        Another question is, in real operation, after receiving a notification, do I need through Gui-O, inform the ESP32 that the notification arrived successfully?

        Best regards

        K 1 Reply Last reply 30 May 2022, 20:13 Reply Quote 0
        • K
          kl3m3n @Sato
          last edited by kl3m3n 30 May 2022, 20:13

          @sato try with version 1.0.4. Do you still experience problems?

          You should also disable all battery and related optimizations for the GUI-O app or the OS will kill the service...

          BR,
          kl3m3n

          S 2 Replies Last reply 30 May 2022, 20:51 Reply Quote 0
          • S
            Sato @kl3m3n
            last edited by 30 May 2022, 20:51

            Hi @kl3m3n,

            Updated to 1.0.4
            All Batterie and other permissions deactived

            Problem the same.
            Now i have disconnect the ESP32 to stop sending notifications

            To deactivate Push Notifications in Gui-O, I have to restart the cell phone

            Best regards

            1 Reply Last reply Reply Quote 0
            • S
              Sato @kl3m3n
              last edited by 30 May 2022, 21:27

              Hi @kl3m3n,

              Attached the screenshot. If i actived the Push Notifications on the Gui-O, with the 1.0.4 i can't open the Gui-O App anymore

              Screenshot_20220530-222147_One UI Home.jpg

              Regards

              K 1 Reply Last reply 31 May 2022, 05:02 Reply Quote 0
              • K
                kl3m3n @Sato
                last edited by 31 May 2022, 05:02

                @sato could you please also post the Android version and phone model?

                S 2 Replies Last reply 31 May 2022, 09:11 Reply Quote 0
                • S
                  Sato @kl3m3n
                  last edited by 31 May 2022, 09:11

                  @kl3m3n,

                  Samsung Galaxy M22
                  I will test the 1.0.4 in the next hour on other Samsung A30s

                  Regards

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sato @kl3m3n
                    last edited by 31 May 2022, 10:09

                    @kl3m3n,

                    Now i use the other Samsung A30s with the 1.0.4.1, it receive the Push notifications but can't open the Gui-O anymore

                    Regards
                    Fernando Santos

                    K 1 Reply Last reply 31 May 2022, 12:23 Reply Quote 0
                    • K
                      kl3m3n @Sato
                      last edited by 31 May 2022, 12:23

                      @sato can you please send me the Android version (not GUI-O version)?

                      S 1 Reply Last reply 31 May 2022, 12:42 Reply Quote 0
                      • S
                        Sato @kl3m3n
                        last edited by 31 May 2022, 12:42

                        @kl3m3n,

                        Now, with your example code, the Samsung Galaxy A30s works the Push notifications, on that is Android10

                        On my other Samsung Galaxy M22, the notifications no work more with the same example code "changed obvious the Application UUID", this phone have Android11

                        Regards

                        K 1 Reply Last reply 31 May 2022, 15:21 Reply Quote 0
                        • K
                          kl3m3n @Sato
                          last edited by 31 May 2022, 15:21

                          @sato Hello, I see the crash reports from the M22... I am making a call on null value (although Android API says the value I am calling cannot be null in this case). I will add a null check and upload the app to beta testers (I believe you are a beta tester? You can check this on Google Play Store, GUI-O listing...).

                          BR,
                          kl3m3n

                          S 2 Replies Last reply 31 May 2022, 15:32 Reply Quote 0
                          • S
                            Sato @kl3m3n
                            last edited by 31 May 2022, 15:32

                            @kl3m3n

                            Please explain how can i get the Beta, sorry, it's new for me

                            Regards

                            1 Reply Last reply Reply Quote 0
                            • S
                              Sato @kl3m3n
                              last edited by 31 May 2022, 17:43

                              Hi @kl3m3n,

                              The current situation!

                              I added in your example code the sending of notifications automatically every 60 seconds via the milis function

                              The cell phone with Android10 gets the notifications with the App closed, but if I try to open GUI-O, it freezes with a black screen

                              The cell phone with Android11 gets the notifications only if the App is open, i.e. it doesn't need to is connected, it only needs to be with the GUI-O logo Connect . Create . Control, but when it receives the Notification this does not overlap the image that is on the screen, I do not know if it is so and I can not compare with what Androi10 has because it does not open the Gui-O

                              Hope this helps

                              Regards

                              K 1 Reply Last reply 31 May 2022, 19:58 Reply Quote 0
                              • K
                                kl3m3n @Sato
                                last edited by 31 May 2022, 19:58

                                @sato hello, thank you for the update... I am reading that Samsung is killing services like crazy (especially newer devices).
                                They have very aggressive battery optimization techniques that break the concept of foreground services. Please see:
                                https://dontkillmyapp.com/samsung
                                Try following the instructions to (at least) paritially fix this. Please keep me informed.

                                I have an older Samsung phone (Android 7) and newer Xiaomi phone (Android 11) and I do not experience the issues that you have.

                                I will also try to find a solution for this.

                                BR,
                                kl3m3n

                                S 2 Replies Last reply 31 May 2022, 21:28 Reply Quote 0
                                • S
                                  Sato @kl3m3n
                                  last edited by 31 May 2022, 21:28

                                  @kl3m3n,

                                  Ok, Thank You

                                  When you have some global solution, that is, independent of the manufacturer of the cell phone would be ideal.
                                  It is complicated that to use this great GUI-O functionality you have to use some specific equipment.

                                  When have news, please informe us.

                                  Regards

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    Sato @kl3m3n
                                    last edited by 31 May 2022, 23:26

                                    Hi @kl3m3n,

                                    Sorry, i again with questions.

                                    I can send message from ESP32 to Whatsapp or Signal trough a Bot, on my both Samsung Mobiles, this Apps works with background service too, or it's diferent?

                                    Another questions is, how can get this Text "OF4321" like the attached Scrennshot, to a String variable

                                    Device_Text.jpg

                                    K 1 Reply Last reply 1 Jun 2022, 06:01 Reply Quote 0
                                    • K
                                      kl3m3n @Sato
                                      last edited by kl3m3n 6 Jan 2022, 08:01 1 Jun 2022, 06:01

                                      @sato
                                      I have been running the push notification service for approx. 10h (Android 7, Samsung Galaxy S6), without any problems sending the notification every 30 seconds. Everything still works ok. So, I am convinced that the service works ok. I will try it on my Xiaomi device also (Android 11) for prolonged duration, but I also don't see any problems here...

                                      Regarding Whatsapp - OEMs (e.g., Samsung) probably keep some list of whitelisted applications that the OS is not allowed to kill, so there is definitely some difference here.

                                      This is (in my opininon) one of the few drawbacks of Android systems (comapring to Apple devices) - due to open sourceness, the OEMs can do what they want, often breaking some core functionalities.

                                      Regarding your second question - when creating a device, specify the optional user name. This is then sent in the usr: parameter. So:
                                      Quick pair -> IoT devices -> add a new device -> specify device and user name.

                                      BR,
                                      kl3m3n

                                      S K 2 Replies Last reply 1 Jun 2022, 09:18 Reply Quote 0
                                      • S
                                        Sato @kl3m3n
                                        last edited by 1 Jun 2022, 09:18

                                        Hi @kl3m3n,

                                        I will try to explain
                                        When I supply the pcb with ESP, I create a device on my phone, with for example, New_987 and no username, from there, I have the In and Out topics that i put in the code to compile in the ESP, the client can later change this name New_987 and it continues working.
                                        Now, if I also use the username and the client makes changes, it stops working.
                                        That is why I ask how to read this device name that appears in the sub-menu of Quick connect, to a String variable, as I sent in the post with the screenshot, so I don't need the username. Please test what I am mentioning.

                                        Regards

                                        K 1 Reply Last reply 1 Jun 2022, 10:21 Reply Quote 0
                                        • K
                                          kl3m3n @Sato
                                          last edited by kl3m3n 6 Jan 2022, 12:23 1 Jun 2022, 10:21

                                          @sato Why don't you specify the user name also? You will then be able to filter incoming messages based on user name also (not just device name, which can be the same on different Android devices).

                                          Let's continue this topic here:
                                          https://forum.gui-o.com/topic/65/add-the-iot-name-to-init/7

                                          BR,
                                          kl3m3n

                                          1 Reply Last reply Reply Quote 0
                                          8 out of 32
                                          • First post
                                            8/32
                                            Last post