@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?
As there is no issue with using WITH_ACK per se, we can concentrate on the issue as described. I don’t think it is within the library itself, but Particle.publish().
every cached unsuccessful event has made it to the cloud once data+wifi has been established
have not had a case, so far, of having thought that an event was sent, but was not actually received (which was my issue using NO_ACK when I was “forced” to use it due the erroneous comment reads)