https://kotlinlang.org logo
#android
Title
# android
t

Tyler

05/28/2018, 3:30 PM
Hi, I've been using Volley to send HTTP requests to my back-end. However this is causing the application to react slowly since it has to wait for the response in order to actually do anything. I want to make a query when the app first loads and use the data at a later point instead, but I'm unsure how I would go about that. (presumably setting some global variable or smthn) any advice?
m

McEna

05/28/2018, 3:59 PM
How big is your response? How old can it be before need refreshing?
t

Tyler

05/28/2018, 5:11 PM
It never needs refreshing, and it's not very large, maybe 500 Bytes
g

gildor

05/29/2018, 5:48 AM
Don't think that such small request could slow down anything. But nothing prevents you from save it to a top level property or in case if Android to Application instance, what is exactly do you want to know?
6 Views