Reputation: 426
I am using volley library in my android app for downloading image and I have few things to get clarify on this library .
I hope, i will be receiving answer soon .
Upvotes: 3
Views: 146
Reputation: 17755
Volley maintains a local cache and uses HTTP methods to know if and when the image needs to be reloaded.
This is based on headers like Cache-Control
, Expires
(to know when to check for a new version) and ETag
to make conditionnal queries (this is a way for the client to say "I already have version XXX send me the content only if it is not the same")
So the server does not push updates, but it controls how often the client will check for updates.
For more details on how Volley handle the HTTP headers you can look at HttpHeaderParser.
Upvotes: 1
Reputation: 2790
I don't think Volley
provides any callback which is used when update is done on server side. Volley
is a networking api which is used to send the data to server.
For receiving updates, you have to implement Push Messaging
feature. When an update is made on server side, server will send the push message to the application and then application will receive the notification and perform its actions.
Upvotes: 1