Câu hỏi phỏng vấn Android
Câu hỏi

What is Implicit Intent?

Câu trả lời

An implicit intent is a type of intent in Android that does not specify the target component to be started. Instead, it declares a general action to perform, allowing any app component that can handle the specified action to respond to the intent[1][2][3].

Implicit intents are useful when your app cannot perform the desired action itself, but other apps on the device probably can[4]. For example, you can use an implicit intent to open a web page, send an email, or share content, without specifying which app should handle the action[1][2].

When an implicit intent is created, the Android system will filter out the components that are registered to handle the specified action based on the intent data[2]. If there is more than one app that can handle the intent, the user will be prompted to select which one to use[4].

To create an implicit intent, you need to set the action and data properties of the intent, but not the component[1][2]. For example:

java Copy
Intent intent = new Intent(...
middle

middle

Gợi ý câu hỏi phỏng vấn

senior

What are best practices for storing and protecting private API keys in applications?

junior

Explain Android notification system

entry

What is the difference between Bitmap and Drawable in Android?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào