Making web service calls to RESTful web services can take quite a bit of code, but there are some great tools available that can make it a lot easier. One of these is an open-source library called Retrofit, created by the folks at Square. Learn how to get started with Retrofit, including how to add the library to your Android project, and define a web service in a Java interface.
- [Instructor] In the original version of this course,…I described how to make web service calls…using raw requests but also using…certain open-source libraries.…In this update I'm going to add coverage for Retrofit,…a really popular open-source library from Square…that makes it easy to construct web service calls…by defining them in Java interfaces.…The interface contains all the information needed…to get to a particular web service…and request and receive data.…
It also lets you ramp up tools for parsing the data,…say if it's in JSON format.…To get started with Retrofit,…I'm using this project,…which is similar to previous projects.…It has a recycler view component and a drawer layout.…It has a broadcast receiver component…to send and receive information from an intense service.…But now, the intense service…has been simplified enormously.…The on handle and tent method is there as it's required,…but all the other code has been commented out…for the moment.…
In the main activity class down toward the bottom,…there are now two methods named request data,…
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
Skill Level Intermediate
Android App Development: Communicating with the Userwith Joe Marini1h 12m Intermediate
Android App Development: Data Persistence Librarieswith Annyce Davis3h 59m Intermediate
Android App Development: Unit Testingwith James P White2h 58m Intermediate
Google Firebase for Android: First Lookwith Joe Marini1h 16m Intermediate
1. Getting Started
2. Manage Multithreading in Android
3. Requesting Data over the Web
4. Working with Binary Responses
5. Sending Data to Web Services
6. Manage HTTP Requests with Libraries
7. Manage RESTful APIs with Retrofit 2
Next steps1m 14s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.