What are intent-filters in Android?

后端 未结 10 2217
渐次进展
渐次进展 2020-12-01 02:34

In my android app, I wanted to start an activity \'B\' from initial activity \'A\'. I have created classes for both of these. However when using following code to start B, I

10条回答
  •  [愿得一人]
    2020-12-01 03:11

    When there are multiple activities set as main and launcher with an intent filter in the manifest. Then first activity considers as Launcher activity, and android launch or open the first activity.

      
    

    The above code makes an app icon available in the device menu, so if we declare 2 launcher activity in the manifest, there will be 2 app icons get created in the device app menu.

    So there will be 2 app icons, on click of the first icon, first declared activity in manifest will be launch, and click of another second declared activity gets launch

提交回复
热议问题