My problem is as follows:
I have an end point, suppose
something.com/token
, to which I have to hit a GET request. From the response that I obtain, I would like to store it in someString token
(This has to be done only once when I start my app)I want to hit another point, suppose
something.com/chat
, to which I have to pass mytoken
to. In my layout, when I click a button - I want togetText
from theEditText
and call an Async task to which I will pass mytext
andtoken
I have been able to reach a stage in which I am able to hit both the requests multiple number of times. Hence, getting the token
multiple times and passing it to my something.com/chat
every time I click on the button
How do I call the first step only once and pass it to my /chat
implementation