Android Support SDK getUpdatesForDevice() bug? | Community
Skip to main content

Android Support SDK getUpdatesForDevice() bug?

  • May 19, 2023
  • 5 replies
  • 0 views

Tim31

When using getUpdatesForDevice() in the Android Support SDK (5.1.2) the updates are incorrect until you open the tickets list (or the ticket itself). So for example, if you receive a new ticket response while the app is closed, and then use getUpdatesForDevice() on launch (after the SDK is initialised) then it will incorrectly report that there are no updates. Opening the tickets list fixes it. Using refreshRequest() on the ticket ID will also fix it which can be called when push notifications are received, but this does not work when the app is closed.

It might be possible to query all the user's ticket IDs on launch and call refreshRequest() on each one before using getUpdatesForDevice() but this should be the SDK's job - there is no documentation around needing to do this.

5 replies

Eric27
  • May 19, 2023
Hey Tim,

Have you been able to replicate this issue on other versions or just 5.1.2? Are these updates being received within the last hour of the previous time the getUpdatesForDevice method was used? If so, keep in mind that the response will be cached for one hour.

 

Tim31
  • Author
  • May 21, 2023

Ah, the updates would have been received within the last hour of using getUpdatesForDevice method so that must be the cause. I missed that catch, thank you!


Eric27
  • May 23, 2023
No worries Tim, let us know if you have any other issues. 

Наталья

Hi,
Could you please tell me, it is possible to get a new response with each request (without caching) in order to get the actual number of new messages?


Greg29
  • August 22, 2023
Hi there! There is currently no way to bypass the cache, so that would not be possible.