is there a function in the Arduino C++-library that responds with true of notification i sREALLY send?

Pushsafer make it easy and safe to get push-notifications in real time on your Android or Windows mobile device, iPhone, iPad and Desktop!

Mit Pushsafer kann man in Echtzeit, einfach und sicher, Push-Benachrichtigungen auf sein iPhone, iPad, Android oder Windows Gerät sowie auf den Desktop senden lassen!

======================
Google Play
App Store
Windows Store
Homepage
StefanL38
Posts: 5
Joined: 9. Nov 2022, 20:58

is there a function in the Arduino C++-library that responds with true of notification i sREALLY send?

Postby StefanL38 » 2. Jan 2023, 20:23

Hi everybody,

i'm developping code for my ESP32 running Arduino C++-code.

I have one device that is partially running on battery. To use as less battery-energy as possible I use a ESP32-board which consumes 15 µA in deepsleep-mode.
I recongnised if I execute code in this way

Code: Select all

      pushsafer.sendEvent(PushSaferData) ;
      esp_deep_sleep_start();
The notification is not sent

I added a delay(5000); to make it work

Code: Select all

      pushsafer.sendEvent(PushSaferData) ;
      delay(5000);
      esp_deep_sleep_start();
My question is:
is there any kind of function that reports "notification send" / "sending notification failed"
so I could code something like this

Code: Select all

      pushsafer.sendEvent(PushSaferData) ;
      while ( !pushsafer.sendEventFinished(3000) ) {
         yield(); // wait for finished "signal" has arrived either successfull or if unsuccessfull with a timeout of 3000 milliseconds
      }   
      esp_deep_sleep_start();
To minimise the power-on-time to the minimum
With power-on the ESP32 consumes 50 mA which is 3000 times more than in deepsleep-mode (0,015 mA)

best regards Stefan

User avatar
admin
Site Admin
Posts: 943
Joined: 1. Dec 2014, 12:41
Location: Germany

Re: is there a function in the Arduino C++-library that responds with true of notification i sREALLY send?

Postby admin » 3. Jan 2023, 10:12

Hello,

pushsafer.sendEvent(input) returns the status of the transmitted notification.

Regards Kevin
Pushsafer DE: Dir gefällt Service und Support! Dann freuen wir uns auf deine Bewertung!
Pushsafer EN: You like Service and Support! Then we look forward to your review!

Pushsafer.com Website - iOS - Android - Windows 10


Who is online

Users browsing this forum: Google [Bot] and 25 guests