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

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -