During development, I want to create run configurations for several activities within my App, so that I can go directly to the Activity I want to test.
But when I create a new Run configuration the list corresponding to "Launch Action" contains only the MAIN Activity and not the others.
Following @sparkymats suggestion I tried adding an IntentFilter to AndroidManifest.xml (either empty or with a android.intent.category.LAUNCHER category), but the Activity list still only contains the MAIN Activity.
How can I directly launch other activities?
In the Manifest file, put these lines inside each activity's tag that you want to lunch
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
To achieve this, you will need to modify your AndroidManifest.xml
and add an IntentFilter
to each one you want to launch directly. An Activity
is launched by sending an Intent to it. So, the Activity
must be configured to receive Intent
s from the launcher.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With