1

I defined a remote service over a AIDL file. Now i want to access this service in a different application. But how can I do that? The AIDL file is not accessible in my second application, and if i just copy the AIDL file, then the service can^^t be found.

Any hints for that problem??

Thanks Sebi

1 Answers1

3

In addition to copying the AIDL file into the other application, you need to advertise the service, via an intent-filter in the manifest, under a name (e.g., action) where your other application can reference it. See here and here for a sample client and service implementing this pattern.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • yes i already used your code to implement the service but there is a problem: the onStart Method of the Service is called, but the onServiceConnected() method on the client is never called and that's why me service object is always null bindService returns true.... – RoflcoptrException Apr 30 '10 at 14:52
  • I can tell you that the code I linked to above works. I do not know why `onServiceConnected()` is not being called in your code. – CommonsWare Apr 30 '10 at 15:12