Recent searches


No recent searches

Android Support SDK getUpdatesForDevice() bug?



Posted May 19, 2023

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.


0

5

5 comments

image avatar

Eric Nelson

Zendesk Developer Advocacy

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.

 

0


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!

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

No worries Tim, let us know if you have any other issues. 

0


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?

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

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

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post