Getting API output twice
I have the following code to do API-calls:
interface VolleyCallback {
fun onSuccess(result: String?)
}
interface VolleyCallbackBrokerList {
fun onSuccess(result: ArrayList?)
}
class RestClient(val server: String, val ctx: Context) {
fun getText(callback : VolleyCallback) : String {
// Instantiate the RequestQueue.
val queue = Volley.newRequestQueue(ctx)
val url = server;
var str = "";
// Request a string response from the provided URL....