Closed atsushieno closed 9 months ago
It is blocking notify_parameters_changed()
dogfooding implementation in aap-juce (https://github.com/atsushieno/aap-core/issues/130).
I wondered if cross-process callbacks are not supported, but it seems to work at least on Java level. Locally confirmed that this example works (it mentions an example git repo): https://stackoverflow.com/questions/13948671/how-can-i-use-aidl-remote-service-to-deal-with-defferent-clients-concurrent-req/34217138#34217138
Other possibilities:
onServiceConnected()
call is done (it is currently done within the call)After more investigation, it turned out that NdkBinder lacks android.os.Binder
equivalent, and it leads to missing Stub
class in the generated code.
When we bind our interface e.g. MyService
in .aidl, there will be IMyService.Stub
class and IMyService.Stub.Proxy
class if it were Java, along with IMyServiceDefault
class. aidl(.exe) with -lang=ndk
generates only IMyServiceDefault
which only provides interface methods stubs.
android.os.Binder
seems to do a lot of work and it is not easily ported to NdkBinder land (at least the full implementation equivalent would be hard task). We need to get around it.
In
AudioPluginInterface.aidl
there issetCallback()
method that passes a callback object to theAudioPluginInterface
service.Its corresponding service
setCallback()
implementation receivesin_callback
correctly if the client and service are the same app (e.g. aapinstrumentsample on its ownPluginManagerActivity
), but if they are different apps thenin_callback
isnullptr
.