Android implicit intents VS explicit intents

前端 未结 9 818
攒了一身酷
攒了一身酷 2020-12-04 16:30

Working with android I realized that implicit intents are good choice in most of cases due to their\'s flexibility. But what\'s about explicit intents? What are benefits of

9条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 16:58

    Implicit Intent

    • It Pulls up the new Application without being specified which one to pull up.
    • It specifies only action to be performed and do not directly specify Android Components.
    • URI can be used with implicit Intent to specify the type of data.

    Explicit Intent

    • It will pull up a specific application and is set while writing the code.
    • It is used in application itself wherein one activity can switch to other activity.
    • Used to pass data to other activity using put extra method and retrieved by target activity getIntent().
    • It is always delivered to target even filter is not consulted.

提交回复
热议问题