
Gain expert knowledge of retrofit in Android using Kotlin through practical concepts and two open-source applications that access real-world APIs like StackOverflow and GitHub.
Understand Udemy's review system and why five-star ratings boost a course's visibility. Provide feedback through a message if you find issues, so the instructor can improve the course.
Explore the basics of retrofit, set up retrofit to send various requests, and build a working prototype that fetches and displays data in an MVVM app.
Retrofit converts an http api into an interface, enabling object‑oriented web calls with synchronous or asynchronous execution, and data conversion to pojo objects via a converter factory.
Download and open the bare-bones Android project, set up Retrofit with coroutines, and explore the MVVM structure and RecyclerView that will display header and key-value data from the API.
Implement retrofit components in an mvvm android project by creating a data class for api responses, defining a get endpoint interface, and building a retrofit service with a json converter.
Execute a Retrofit API call in Kotlin, manage loading state, handle onResponse and onFailure, and transform the API response into a categorized list for a RecyclerView.
Explore the Retrofit response object from an API call. Access the body, code, headers, and error body, and use isSuccessful.
Learn to intercept retrofit requests and responses and log them to the console with the http logging interceptor, using basic, headers, and body levels, enabled only for development builds.
Explore how to resolve URLs by composing a base URL with endpoints for Retrofit, review http methods like get and post, and manage queries, body, form data, and headers.
Discover how Retrofit resolves URLs by concatenating a base URL ending with a slash with an endpoint not starting with a slash to form the final URL, including logging examples.
Explore Retrofit http methods including get, post, put, delete, options, head, and patch, and learn how to send parameters in the url or in the body.
Explore how to add query parameters in Retrofit using static parameters, dynamic at query with name and age, optional nullable parameters, and a query map to build flexible get requests.
Learn to manipulate urls in retrofit by using a static base url, bypassing it with a full url, and applying dynamic urls and path replacement for endpoints.
Learn to send data to the backend via the request body in a post request, replacing query parameters with json-serialized Kotlin objects and handling the response body.
Learn to send form data to an endpoint with Retrofit using form URL-encoded and post requests. Use fields or a field map to send multiple fields in the body.
Master how to pass headers in Retrofit requests with static, dynamic, and header map options, and see them echoed in responses including cache-control, user-agent, and username.
Implement a custom interceptor on the http client to automatically attach a header to all outgoing requests, using a new request builder and chain.proceed for authentication and user agent customization.
Explore how response body serves as a generic API response in Retrofit 2, enabling you to check operation success, access headers and HTTP codes, or handle raw data.
Explore synchronous and asynchronous communication in Retrofit, learn how to cancel requests, implement caching, and understand paging, with a preview of a real-world StackOverflow API project.
Explore synchronous and asynchronous communication in Retrofit, showing enqueue handles background work and main-thread delivery, while execute runs on a background thread via coroutines.
Learn to cancel Retrofit requests by keeping a reference to the call object, invoking cancel, and handling isCanceled to distinguish cancellation from failures in asynchronous calls.
Learn to implement caching in retrofit by configuring a cache with a directory and size, using validity windows, and instantiating the api with application context via a view model.
Retrofit does not natively support paging; implement paging in your code based on the API, using query parameters or path-based endpoints to fetch pages.
explains oauth open authentication flow, where users authenticate with a third-party api and your app receives a token to access data, increasing safety and user control.
Learn how to integrate RxJava with Retrofit to convert API responses into a single observable, manage threading with schedulers, and handle disposal in view models.
Build an android app that uses the StackOverflow API to fetch and display questions with a loading spinner. Navigate to answers by tapping a question, with pagination for both lists.
Explore a scaffolded android mvvm app showing question titles in a recycler view, with loading, swipe-to-refresh, and answers, using retrofit to fetch questions from api dot stock exchange dot com.
Set up retrofit to fetch Stack Overflow questions, create a generic API response wrapper with items, define a question model, and configure the retrofit service and base URL.
Fetch questions from the Stack Overflow API via Retrofit in the view model, update live data and the adapter, and convert titles from HTML with SDK checks.
Implement paging in android retrofit by updating a page counter, fetching next pages, and appending results as the user scrolls to the bottom.
Finish the main screen user interface by implementing swipe to refresh, loading the first page, and displaying score and date for each question, with a bottom-aligned layout.
Build the Android detail screen by handling recycler view clicks to open a new activity, pass the question via parcelable, and load answers using a ViewModel and the question ID.
Create a detail activity in Kotlin, configure an intent with a companion object param, pass a question as Parcelable, read it in onCreate, and finish if null.
Implement retrofit for answer items by creating an Answer data class with serialized names for answer_id, is_accepted, score, and creation_date, plus a getAnswers endpoint using question_id and page.
build a detail view model in Kotlin extending view model with live data for answers, loading, and error; implement getNextPage using question id and page to fetch answers via Retrofit.
Implement a recycler view adapter and view holder to display answers in a cardview via answer_layout and item_answer, with an addAnswers method to update the list.
Wire the detail activity with a detail view model, recycler view, and an answers adapter, then implement pagination and observe loading, errors, and answers to populate the question's answer list.
Authenticate with GitHub via OAuth 2, fetch user repositories and pull requests, view comments on a PR, and post new comments using RxJava for data flow.
Access a ready-made Android Retrofit 2 Kotlin project foundation with MVVM structure and preconfigured UI, open in Android Studio, and begin implementing authentication to unlock features.
Set up GitHub authentication for an Android Retrofit course project by registering an OAuth app, obtaining client id and secret, and using Retrofit to access repositories and pull requests.
Implement an Android oauth flow by launching the GitHub oauth URL with client ID and redirect URL, and intercepting the callback in onResume to extract the authorization code.
Set up Retrofit authentication in a Kotlin Android app by modeling a GitHub token, defining the API interface, and using a ViewModel with RxJava to fetch and manage the token.
Create a GitHub test repository and initialize a local git repo. Add and commit files, push to remote, create branches, and open pull requests with comments for practice.
Retrieve user repositories with Retrofit 2 in Kotlin and populate a spinner with repository names and URLs. Implement data classes for GitHub repo and GitHub user, and add token authorization.
Retrieve pull requests for a GitHub project, model them as GitHub PR data, call the pull request API, and populate a second spinner via a view model.
Complete the comments retrieval feature by implementing it in your android retrofit project, mirroring the PR functionality, and review the instructor's approach in the next video.
Retrieve pull request comments by implementing a GitHub API call and a GitHub comment data class with body and id. Manage comments with LiveData and update UI elements when loading.
Learn to post comments to a GitHub pull request with Retrofit in Kotlin, building the post comment endpoint, handling responses, authenticating, and refreshing the UI by reloading comments.
Celebrate finishing the course and apply the knowledge to build more useful and easier to use Android apps, using Retrofit to communicate with back-end APIs.
This is the most complete resource online for learning about Retrofit for Android development
This course will take you step by step, through each concept related to Retrofit, discuss it in detail, then apply it in a practical project.
We will cover topics such as:
Basic Retrofit implementation
Logging
URL resolution
GET, POST and other request methods
Queries
URL manipulation
Request body
Sending form data
Headers
Canceling requests
Caching
Pagination
Synchronous vs asynchronous communications
Retrofit with RxJava
Authentication
In addition, we will also be working on two Android apps to apply the knowledge we learned.
StockOverflow communication app
GitHub authentication and data retrieval app
This course is great if you want to take your Retrofit skills to the next level.
Sign up today and let's start learning about Retrofit for Android.