1

Im using a web service that sends json to my android app. After i update/post a record in the database then i try to get the record it still returns the old value and not the new value. The database is showing the correct data and i tested postman and it works. I use volley in android to recieve json request and its the old value. Ive tried disabling cache in volley. Why would it not get the current data from the database? Or how can i force it to get the latest data from the database.

Postman results {"CFirstName":"Tim","GoldStar":"5","Teacher":"May"}

Android-volley results{"CFirstName":"Tim","GoldStar":"15","Teacher":"May"}

crashovski
  • 33
  • 10
  • try `request.setShouldCache(false);` before you add any reqeust. – zeekhuge Aug 29 '17 at 22:34
  • I tried that, it still doesn't work – crashovski Aug 30 '17 at 12:49
  • Well, then you might want to enable `VERBOSE` [debug logging for Volley](https://stackoverflow.com/questions/22540120/detailed-debug-logs-with-volley) and add the logs to the question. – zeekhuge Aug 30 '17 at 14:31
  • I tried another device and it works on there. So is there caching happening on the actual device? @ZeekHuge – crashovski Aug 30 '17 at 16:56
  • Well, I am not sure why that is happening. What all I can say, though its pretty trivial but sometimes might just work, is try uninstallig the app from the device, make a clean-build and then install it again. – zeekhuge Aug 30 '17 at 20:34

0 Answers0