views:

33

answers:

1

Hi all,

I have two different project A & B. Inside the project A I link the source from project B so activity from project A can start the activity from project B. I'm using Eclipse Galileo.

The problem is, when I want to edit the value of a view in activity B, the resource id from both projects have some conflicts in it. So when I call findViewById() in activity B I got a view from the activity A instead.

I've declared the activity B inside the AndroidManifest in project A. I've even tried to start the activity B as the entry point of the application but it didn't show anything at all. It's like the findViewById tried to search the view of project A only although I've specified the package name correctly.

findViewById(com.my.company.projectB.R.id.someView);

Does anyone have any idea about what's going on? I'll really appreciate any help. Thanks!

+1  A: 

I've found the problem. It lies within my manifest file of project A. I shouldn't have declared the activity B there. So basically said, in order to correctly call an activity from another application (project B) the things need to be done:

1). Install the application B (of course!) by running or debugging it.

2). Declared the intent-filter of activity B correctly in its own project. No need to declare it in the project which will call it (this is where my mistake was).

3). Start the activity using the intent specified in the intent-filter.

Posted the answer here just in case someone else encounter the same problem as mine :)

swMadjid