0

I am using the vndbinder to remotely call API in a binder service process. All APIs work well but the one with a callback parameter is not running as expected. The call sequence is showed in the blow diagram.

I tried A:

  1. register the callback(let's call it CB1) so that the callback object is set on binder server side
  2. pass the static member callback funtion(let's call it CB2) pointer to a C-style API and into the service child thread
  3. service child thread triger the callback(3:callback in the diagram)
  4. the CB2 run and prints the expected log, and then trys to trigger CB1(5:callback in the diagram), but the CB1 in binder client does not run.

I suspect there is something wrong with the backward communication from binder server to binder client, so

I tried B:

  1. triger CB1 directly, but
  2. CB1 in binder client is successfully run.

sequence

I tried as above, B is fine. But in A step 4 is not as expected. 5 and 6 is in a same static C++ style member function Sorry that I can't show the code because of confidential reason.

erratum:
3 and 4 should be in service child thread. And I tried to create a child thread in which Callback 5 was tried to be triggering and it was not running on binder client either. So the problem is transfered to "why callback function on binder client can not be triggered by binder server's child thread ?"

Benjamin
  • 1
  • 1

0 Answers0