Implicit and explicit Intent questions.

Asked 1 years ago, Updated 1 years ago, 70 views

I have a question about the use of explicitly implied Intent.

I know that explicitly specifies the object when creating Intent.

I understand that implicit uses Action or Category to run other apps.

The question is that if you use setComponent or setClassname (Context, className) in an implicit int, is it true?

If it is correct, will all existing information be ignored if the component is set on the implicit Intent?

Will all set Category and action values disappear?

Lastly, does the set Category in the explicit Intent affect the behavior?

android intent

2022-09-21 20:33

1 Answers

1. If you create an Intent with setComponent() / setClassNamed(), it is correct to call it explicit. Conversely, if you create an content with information such as action, type, and categories, you use this information to find the appropriate activity, which is called implicit. Because the component name does not exist, you will find an activity to run with action, type, and categories.

2. If you set a value with setComponent(), values such as action, type, and categories become meaningless. Because setComponent() contains information about which activities to run. In summary, even if action, category information is set, the clock specified as setComponent() I don't think it would be unreasonable to understand that the lath is always running.

Note


2022-09-21 20:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.