Skip to content

Networking

This section covers how an Android client communicates with APIs: HTTP semantics, transport libraries, alternative API protocols, and the boundary between network responses and application models.

Suggested path

Start with HTTP and REST, then see how Retrofit and OkHttp implement requests on Android. Explore GraphQL or gRPC when your backend uses those contracts. Across all approaches, consider timeouts, cancellation, error mapping, authentication, and unreliable connections. See Security for TLS and token handling; see Offline-First Mobile Application for local data and synchronization.

Articles

  • HTTP / REST - methods, status codes, caching, retries, and API contracts.
  • Retrofit / OkHttp - request construction, interceptors, serialization, and error handling.
  • GraphQL - queries, mutations, schema-driven clients, and caching trade-offs.
  • gRPC / Protobuf - typed contracts, serialization, streaming, and mobile constraints.