I am facing this kind of problem:
I have a remote (different process) bound service which defines an IntentFilter
with action String.
My client binds to it using the same action String in its bindService(..)
call.
Now when I implement another service with completely different AIDL interface but with the same IntentFilter defined, install this service and remove the old one:
- my client is still able to bind
- my client is even able to call the desired method (say void print(Payload)) the client side does not complain, nor the server side
My question: is there a way how to check at runtime the interface the remote service is implementing?
The only possible way I've found is to check the ComponentName
in the ServiceConnection
.
This has however one implication:
I will not be able to exchange the implementation of the service in the future.
Or am I missing something?