Jeff Storey Jeff Storey - 1 month ago 21
Android Question

android bind to AccessibilityService

I have created an android service, which is an

AccessibilityService
. From my activity, I would like to bind to that service. There is no inter process communication, so I have tried creating a local
Binder
implementation that just returns the service (as in this example http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html).

The problem is that
onBind
in
AccessibilityService
is
final
and I cannot override it to return my local binder.

Does this mean I need to use AIDL if I want to bind to the service?

Answer

No, it means that you cannot bind to the service, period. You would need to override onBind() for AIDL.