views:

14

answers:

1

hi there!

i have coded this service, that computes stuff and i want other applications to be able to bind this service, i.e. i want to enable other programmers to communicate with this service.

problem is, this has to work without these other programmers to get access to the source code. just the (installed) apk with the remote service is given (and of course a detailed description of the service' interface)...

problem is, eclipse keeps braggin' about that the packages of the service are not available in source code...

how do i do this?

+1  A: 

problem is, this has to work without these other programmers to get access to the source code. just the (installed) apk with the remote service is given (and of course a detailed description of the service' interface)

The "other programmers" will need the AIDL file describing your interface. They will also need to know the Intent to use to bind to your service. A "detailed description", while nice, is not going to be sufficient.

problem is, eclipse keeps braggin' about that the packages of the service are not available in source code...

You might consider, in future questions, being a bit more clear about what you mean by slang like "eclipse keeps braggin'".

how do i do this?

Give the other programmers the AIDL file and the Intent definition. The other programmers will need to put the AIDL file in their own projects' src/ trees in the appropriate directory, then call bindService() using the Intent you describe.

Here is a client and service demonstrating this technique.

CommonsWare