how to run Specific activity in android emulator?

后端 未结 6 1558
無奈伤痛
無奈伤痛 2021-01-29 00:36

i have created 4 activities in eclipse now i want to run activity 1, 2,3 ,4 repectively one by one in emulator for testing.

can any one guide me how can i run those all?

6条回答
  •  -上瘾入骨i
    2021-01-29 01:05

    You could try startActivityForResult but you may need to possibly modify your program your applications to handle this. I would suggest using one of the android sdk tools called am (activity manager). In the adb shell:

    # am start -n package-name/activity-1-name
    # am start -n package-name/activity-2-name
    # am start -n package-name/activity-3-name
    # am start -n package-name/activity-4-name
    

提交回复
热议问题