Verification of data submission for retry / firestoreDB #226
-
I am developing an application that sends a string of text to a Firestore database. My challenge arises from my poor internet connection. To mitigate this issue, I've implemented a connectivity routine that checks for an internet connection whenever I need to send data, which occurs every 24 hours. I am currently looking for a way to verify the error payload and implement a retry mechanism if the submission fails. How can I do it? This is the part of my code that handles sending data`bool SendFBData() { // getting strings from eeprom DocumentValues::Value doc("TrtdWater", Values::Value(WATER)); // Operação crítica Serial.println(documentPath); // Define a way to verify the submission status /*if (error) = true; |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
The examples already provided information you are asking for.
https://github.com/mobizt/FirebaseClient/blob/main/examples/FirestoreDatabase/Documents/Sync/CreateDocument/CreateDocument.ino
https://github.com/mobizt/FirebaseClient/blob/main/examples/FirestoreDatabase/Documents/Async/Callback/CreateDocument/CreateDocument.ino