android - how to find the name of the main activity of an application?

前端 未结 5 1140
既然无缘
既然无缘 2020-12-16 19:50

For example, I want to start Gmail in code/command line, but I don\'t know its main activity name.

am start -n com.google.android.gm/.XXXXX

5条回答
  •  不知归路
    2020-12-16 20:25

    This can be found in the application's manifest.

    The main activity is the activity with the intent-filter whose name is android.intent.action.MAIN.

提交回复
热议问题