React Native

Permissions & Device APIs

Camera, geolocation, contacts, notifications, permissions handling, react-native-permissions

20 câu hỏi phỏng vấn·
Mid-Level
1

Which library is most commonly used to manage permissions in React Native?

Câu trả lời

react-native-permissions is the standard library for managing permissions on iOS and Android. It provides a unified API to request and check permissions like camera, geolocation, or contacts, while handling platform differences transparently.

2

What are the possible statuses returned by the check() function from react-native-permissions?

Câu trả lời

The check() function returns one of the following statuses: UNAVAILABLE (feature not available on the device), DENIED (permission not requested or denied but still requestable), LIMITED (iOS 14+ for partial access), GRANTED (permission granted), or BLOCKED (permission permanently denied, requires going to settings).

3

What is the difference between check() and request() in react-native-permissions?

Câu trả lời

check() only verifies the current permission status without user interaction, while request() checks the status then displays the system dialog if the permission hasn't been requested yet. It's recommended to call check() first to adapt the UX before using request().

4

How to redirect the user to the app settings to modify a denied permission?

5

In which file should permissions be declared on iOS?

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

Nắm vững React Native 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í