Access remote service in different application
I defined a remote service over a AIDL file. Now i开发者_如何学C 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
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.
精彩评论