To work with most web services, you need to know how to send arbitrary parameters: values that the web service interprets as requests to filter data or take other actions. I'm working in a version of my project called GETParams. I've gone back to a very simple app only displays the names of items it downloads from a service.
- [Narrator] So far in this course,…I've described how to make simple HTTP requests…retrieving texts and binary based content,…but to work with most web services,…you need to know how to send parameters,…values that the web service interprets as requests…to filter data or take other actions.…I'm working in a version of my project,…and I've gone back to a very simple app…that only displays the names of items…it downloads from a service,…and now I'm back to running on a physical device,…a Nexus 5X running Android 7.…
I can clear the screen, run the code,…and see all the data retrieved from the remote service.…Now my goal is to make this a more complex request…to be able to include parameters,…and specifically I want to be able to filter the request…based on a category.…To make this a lot easier,…I've created a new Java class…and I've stored the code in a gist…that I'm going to copy and paste into my project.…In this version of the project getParams,…I'll create a new Java class,…and I'm going to name it RequestPackage.…
IInstructor David Gassner starts with an overview discussion about available networking strategies, and then dives into how to declare networking permissions, make network requests, handle responses, parse data returned from a web service, and pass user credentials to services that support HTTP basic authentication. He also provides an overview of popular higher-level networking libraries, including OkHttp and Picasso, and offers recommendations for improving performance in network-connected apps. David also covers using static feeds, using dynamic PHP pages hosted on a public server web service, and integrating apps with network data storage.
- Integrating mobile apps
- Communicating with Android
- Preventing app freezes with background threads
- Preparing an app for network communication
- Declaring permissions
- Checking network connectivity
- Retrieving data over the web
- Using traditional APIs
- Using third-party libraries