โ† All Android Development Flashcard Decks

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
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.