For instance, I have a few activities within one app, and in order to see a certain activity\'s UI or whatever, I need to run a certain activity that is not the launcher of the
Very easy. Start by exporting the activity you need to run:
Add android:exported="true"
in the Activity declaration in the Manifest. This is because am
is an external application, and you need to export Activities to allow external application to start them.
Go to "Edit Configurations..." in the "Run" menu.
In the left pane, select your application. In the right pane, in the "General" tab, in the "Launch Options" section, there is a "Launch:" dropdown.
Select "Specified Activity", and enter the name of your activity as it appears in your Manifest.
You can create as many Configurations as you like, and name them according however you like, for example to indicate which activity is being started.