开发者

how do I run Android test project from another android application

开发者 https://www.devze.com 2023-04-02 04:41 出处:网络
I created an Android test project using instrumentation and it works find with eclipse running as Android Junit test. It also generated apk file.

I created an Android test project using instrumentation and it works find with eclipse running as Android Junit test. It also generated apk file.

My question is how do I run this test from anot开发者_如何学Goher android application instead of from eclipse. For example, if the test project is named T and I have another Android application named A. Then I would like to open up T from A.

Thanks in advance..


I think it will be good if you try to call the appropriate intent on a button click or on whatever you want to start the program. For example: startActivity(new Intent("com.yourprogram.T") I'm not sure but i think it will works.


Why do you need to open Test project from an app on Device. I dont think you can do it because Android does not allow any app to inject action or call functions from other apps.

0

精彩评论

暂无评论...
验证码 换一张
取 消