I have a JobIntentService that is launched every time a push notification comes in to tell the service to go fetch more data. While the app is in the foreground everything works as it should.
When the app is in the background and multiple push notifications come in, the intent gets queued up and it executes the same intent multiple times putting unneeded stress on the server because the first call to the server will get all the information it needs making the other queued intent's from the push notifications unnecessary.
Is there anyway to cancel or not add the same intent to the queue or some other way to prevent the extra calls to the server?
from How to remove duplicate intent from JobIntentService
No comments:
Post a Comment