Android Networking Flashcards
6 cards from real Android Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Android Networking flashcards as text
Which Kotlin library is commonly paired with Retrofit for asynchronous network calls using coroutines?
Answer: kotlinx.coroutines
Kotlinx.coroutines integrates with Retrofit via suspend functions, enabling clean asynchronous networking without callbacks.
What HTTP status code indicates a successful response?
Answer: 200
HTTP status code 200 (OK) indicates the request was successful and the server returned the expected response.
Which Retrofit annotation is used to send a POST request body as JSON?
Answer: @Body
@Body annotation in Retrofit designates a parameter as the request body, which is serialized using the configured converter.
What is the purpose of the NetworkSecurityConfig in Android?
Answer: To define trusted Certificate Authorities and network security policies
NetworkSecurityConfig allows you to customize network security settings like trusted CAs, cleartext traffic, and certificate pinning via XML.
Which library is used for efficient image loading from URLs in Android apps?
Answer: All of the above
Glide, Picasso, and Coil are all popular Android image loading libraries that handle downloading, caching, and displaying images from URLs.
What does certificate pinning protect against in Android networking?
Answer: Man-in-the-middle attacks using fraudulent certificates
Certificate pinning ensures the app only trusts specific server certificates, preventing man-in-the-middle attacks using rogue CAs.