All Questions
13
questions
0
votes
1
answer
578
views
Wait for the server response using callback java
I am creating a Quiz app on android studio and the questions will be called from an URL containing a JSONObject, and since these API calls happen asynchronously,
i have to make sure that my app is ...
2
votes
1
answer
3k
views
How to pass different callbacks to same function in android
I am new to android and I am currently trying to make volley post request and get a response from an API. What I did is call a callback when the response is successful. This callback works fine if I ...
0
votes
1
answer
237
views
Return a result to same level as the call Volley android
I know there are a few very question that are almost identical, however they are just different enough that I can't get my code to work.
I'm using volley to check if a token is valid and want to be ...
1
vote
0
answers
205
views
Using a callback interface to handle asynchronous volley request, response isn't handled properly
I'm using a Navigation Drawer activity into which I'm loading a listview fragment, where some text retrieved from the server is supposed to be loaded. I'm using volley to send a JSON Object request to ...
0
votes
1
answer
148
views
Wrapping a Callback Function
In an Android app that I'm writing, much of the app involves performing web requests to a specific API. Since the format of the data ends up being the same, I wanted to centralize many of the ...
0
votes
1
answer
1k
views
Android Volley how to synchronize data from Listener.onRespone() for to use it outside onRespone()
I need to read data from a internet server and display it in MainActivity via ListView. I've decided to use Volley lib to get data.
After reading stackoverflow for hours I've achieved to extract data ...
0
votes
1
answer
840
views
How to get and wait for data from multiple urls using Volley
In my application, the functionality is as below:
First I am creating JsonObjectRequest using Volley. This returns me the JSON data.
Here I used this technique with callback to make sure I’m getting ...
0
votes
1
answer
295
views
How to use Volley in Android programming and keep code clean? (callback issues)
Right now I have working code for my Android application. I use Volley, but, because of callbacks, I don't feel like my code is as clean as could be.
Two functions of my code right now are:
private ...
0
votes
1
answer
583
views
Callback function in Android
I am using Volley to make Http requests to my Web Api.
However I am having trouble getting the values from my api calls due to the asynchronous nature of Volley.
I have read that using a callback ...
9
votes
3
answers
18k
views
How to create a proper Volley Listener for cross class Volley method calling
I aim to call Volley from another class in, a very succinct, modular way ie:
VolleyListener newListener = new VolleyListener();
VolleySingleton.getsInstance()....
0
votes
0
answers
618
views
Callback in android(Network call in separate class)
I have layout xml name main.xml and i have main.java class in that class now i send network call and get data from rest service.But now i want to separate network call in anohther class.How can i do ...
0
votes
2
answers
141
views
Return a string from an anonymous class
I have an android project in which I use a class to send http requests using the Volley library.
It is called WebServicesAdapter. I used a callback in it to return a value to the called activity but ...
0
votes
1
answer
706
views
Callback function on Android
In java 8 there are the new Lambda functions and method references. Are there something similar on android? Using volley I need to pass a callback function to handle the onResponse, what's the best ...