How to run a certain activity in Android Studio? -
for instance, have few activities within 1 app, , in order see activity's ui or whatever, need run activity not launcher of app.
one stupid way build "door" activity in launcher , go inside activity door. however, there better way run activity alone?
very easy. start exporting activity need run:
add android:exported="true"
in activity declaration in manifest. because am
external application, , need export activities allow external application start them.
go "edit configurations..." in "run" menu.
in left pane, select application. in right pane, in "general" tab, in "launch options" section, there "launch:" dropdown.
select "specified activity", , enter name of activity appears in manifest.
you can create many configurations like, , name them according like, example indicate activity being started.
Comments
Post a Comment