Greetings everyone,
This is my first post on the forum and my first time using a Particle device so I apologies for any mistakes I may make.
I am working on creating a custom Android app using the Particle SDK. I have been able to get all but one of the functions I need to work. I am able to subscribe to events from my Particle devices and publish responses back to the devices from my Android app. However, one key feature I haven’t been able to figure out yet is subscribing to events and then waiting for long periods of time before the event is received. The app needs to update its values when it receives the data from the Particle devices. This does not happen at regular intervals because certain conditions need to be met before the Particle device will send the data. I have done a fair bit of testing and determined that the problem is that when the phone goes to sleep, Android seems to be closing the connection the subscribe function has with the cloud.
Has anyone had success creating an Android app that can subscribe and keep listening during sleep?
Any help is greatly appreciated.