android - Volley, Webservices and login -


i'm trying communicate api volley. ideally, able use dataaccesslayer this:

dal.addtransaction(value, description); 

the main problem is, before doing call api, must login. login request return me access token, have integrated in other call.

i thinking doing login in dal constructor, in fact, since requests made asynchronously, addtransaction request refused if reaches api before login request.

do have clue how develop kind of data access layer without dirty coding?

i have been trying play listeners, it's far less easy javascript's callbacks function.

thanks in advance.


Popular posts from this blog

javascript - Js, document.getElementById("ID").innerHTML, error -

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -