Android

Android Networking

HTTP, REST API, Retrofit, OkHttp, JSON parsing, Network security

29 câu hỏi phỏng vấn·
Junior
1

Which permission is needed to access Internet?

Câu trả lời

The permission <uses-permission android:name='android.permission.INTERNET' /> must be declared in AndroidManifest.xml. It's a normal permission (not dangerous) that doesn't require runtime request. Without this permission, any network connection attempt will fail with a SecurityException.

2

What is Retrofit?

Câu trả lời

Retrofit is a type-safe HTTP client for Android and Java developed by Square. It turns an HTTP API into a Java/Kotlin interface with annotations. Retrofit automatically handles JSON serialization/deserialization, asynchronous requests, and integrates with OkHttp, Coroutines, RxJava. It's Google's recommended solution for network calls.

3

What are the main HTTP methods?

Câu trả lời

Main HTTP methods are: GET (retrieve resources), POST (create a resource), PUT (completely update a resource), PATCH (partial update), DELETE (delete a resource), HEAD (retrieve headers only), OPTIONS (communication options). GET and DELETE are idempotent, POST is not.

4

What is the HTTP GET method used for?

5

What is the HTTP POST method used for?

+26 câu hỏi phỏng vấn

Nắm vững Android cho lần phỏng vấn tiếp theo

Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.

Bắt đầu miễn phí