title | type | duration | creator | ||||
---|---|---|---|---|---|---|---|
Volley |
Homework |
1:30 |
|
Note: This homework can be a pair programming activity or done independently.
After Retrofit, the next most popular neworking library for Android is Google's Volley. In this homework, you will use the Volley documentation as a guide and implement Volley to make network calls to Walmart's API.
- Replicate your Networking in Android Lab using Volley to make all your network calls
- Make the same calls to the Walmart API that you made for the lab, and display the products to your user
- Use Volley's
RequestQueue
to perform API calls asynchronously on a worker thread (instead of the AsyncTask approach used in the lab)
Bonus:
- If a user clicks on of the product buttons while a network request is still pending, cancel the existing request and launch the new one
- Replace your old code that creates
JSONObject
s andJSONArray
s manually by using GSON instead
You have three options:
- Build this app from scratch
- Start with your code from the Networking in Android Lab
- Start with the provied solution code from the Networking in Android Lab
Submit a pull request with your completed app. If you work with a partner, only one person needs to submit, but put both names in the pull request title.
Here is a gif that demonstrates the required functionality:
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.