@rickkas7’s excellent PublishQuequeAsyncRK library has a known issue when using Particle.publish() with the WITH_ACK flag:
// For reasons that are not entirely obvious to me, you can't use WITH_ACK. If you specify it // on the Photon or Electron, Particle.publish will immediately return false. This only happens // with this code running in a separate thread. It works fine from the main thread.
This is an issue because I need the event to positively make it to the Particle cloud.
I can create a situation where the routine thinks it has sent it okay, but it does not make it because I have (purposely) turned off the data on my mobile hotspot.
This should be solved by using WITH_ACK in the Particle.publish() call.
It looks like the work around is provided in the statement “works fine in the main thread”.
Q1. How does one achieve that?
Q2. Any other suggestions on what I should try to get this library working with WITH_ACK?
Q3. Does anyone know if there is a similar library that caches to SD CARD rather than/as well as, retained memory?