Applications can't link against each other. You'll need to link all needed code into each app.
2009/8/31 Lutz Schönemann <[email protected]> > Hi, > > I have created a service and want to expose the interface to other > applications. For one service I have done this successfuly. I just put the > AIDL interface into the new project and all worked fine. Now for this > service I've done the same but I get a java.lang.VerifyError when trying to > use this interface. I think that the problem is that the AIDL uses a class > (PolicyRole) that is only defined in the source code of the service. To > compile the source that uses the interface I had to link against the code of > the service but at runtime the error appears. > > > > The AIDL for the interface I want to use > > --- 8< --- 8< --- 8< --- > > package de. [...] . [...] .softwarepolicy.pep; > > import de. [...] . [...] .softwarepolicy.pep.roles.PolicyRole; > > interface IPEPServiceManagement { > List<PolicyRole> getAvailableRoles(in int type); > > void setRoles(inout String[] roles); > > List<PolicyRole> getActiveRoles(in int type); > > void updateRoles(String uri); > void reloadRoles(); > } > > --- 8< --- 8< --- 8< --- > > > > the AIDL for the class PolicyRole that is used in the previous AIDL > > --- 8< --- 8< --- 8< --- > > package de.fraunhofer.sit.softwarepolicy.pep.roles; > > parcelable PolicyRole; > > --- 8< --- 8< --- 8< --- > > > The code for the class PolicyRole is only inside the services project so I > added the service to the build path and the compile doesn't complain.. > > can someone give me a hint how to expose a service the right way? > > Thanks -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

