Last active
January 4, 2016 21:29
-
-
Save mbarcia/8681592 to your computer and use it in GitHub Desktop.
Creating an instance of a Volley request by means of an adapter class, and adding it to the queue for execution. Part of http://develop-for-android.blogspot.com.es/2014/01/using-volley-in-your-application_28.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String baseUrl = | |
"http://www.webservicex.net/currencyconvertor.asmx/ConversionRate"; | |
// using the cached request | |
Request<String> request = new CachedStringGETRequest( | |
baseUrl + "?fromCurrencyCode=USD&toCurrencyCode=EUR", | |
new ErrorListener() { | |
@Override | |
public void onErrorResponse(VolleyError error) { | |
Log.w("exampleapp", "Exchange rate USD " + | |
"to EUR failed to update. " + error ); | |
} | |
}); | |
Volley.newRequestQueue(this).add(request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment