What is the difference between a Bundle and an Intent ?
What is the difference between a Bundle and an Intent ?
The main differences between Bundle and Intent in Android are:
Bundle is a collection of key-value pairs used to store data, while Intent is a messaging object that facilitates communication between components and specifies an action to be performed[1][2].
Intent is used to navigate from one Android activity to another, while Bundle can be used to store data related to objects[1].
Bundle offers more interfaces and is more flexible to use compared to Intent[1].
Intents can be either explicit (specifying the target component) or implicit (specifying an action for the system to resolve to a target component), while Bundles are always associated with a specific Intent[2][3].
Intents can be used to launch activities, start services, broadcast messages, dial phone numbers, open maps, etc., while Bundles are primarily used to pass data betwee...
middle
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào