Reputation: 180
I am creating an android application where I want to access the views/layouts of some other application.I know the package name and the Activity name of the application I need to access.
Suppose the application I need to access is "Hello World" - the package is "com.hello" and the activity is "com.hello.HelloWorldActivity". Now based on this information I need to find the layouts and views in the HelloWorldActivity.
Is there a way to do this. Can someone help me on this.
Thanks in advance.
Upvotes: 0
Views: 5725
Reputation: 56925
I think it should work.
View view = View.inflate(this, package_name.R.layout.layout_id, null);
Upvotes: 0
Reputation: 2309
you may watch as Android Test Projects (JUnit) have access to same signed apps. For example Robotium may access to views of differens activities.
Upvotes: 1
Reputation: 5407
No this is not possible. The only thing you can access at runtime is SharedPreferences and this only if the developer of the other App wants you to.
Upvotes: 0