Networking for Android Developers
Networking on Android is how an app talks to web services. Retrofit turns an HTTP API into a Kotlin interface, OkHttp performs requests with interceptors and caching, and WorkManager runs deferrable background tasks such as sync, so work finishes reliably even if the user closes the app.
Stage: Data and Networking · Part of the Android Developer roadmap · Last reviewed 19 November 2026
What to learn in Networking
- Declare a Retrofit interface with GET and POST endpoints
- Parse JSON responses into data classes with a converter
- Add an OkHttp interceptor for logging or auth headers
- Handle network errors and show loading and failure states
- Schedule a periodic sync with WorkManager and constraints
Networking interview questions
What is the difference between Retrofit and OkHttp?
OkHttp is the HTTP client that opens connections, sends requests, handles caching and runs interceptors. Retrofit sits on top of it and lets you describe endpoints as annotated Kotlin interface methods, converting JSON to objects. Retrofit uses OkHttp underneath, so you often configure both together.
When would you choose WorkManager over a coroutine?
Choose WorkManager for work that must complete even if the app process is killed or the device restarts, such as uploading data later when the network returns. A coroutine lives only while its scope lives, so it suits work tied to the screen or the app being open.
Where Networking fits in the Android Developer roadmap
Networking belongs to the Data and Networking stage (beginner level), which takes about 5 hours. Storage and APIs.
Other units in this stage
Back to the full Android Developer roadmap