Reputation: 1
Server App:
Let's say I have serviceImpl class A & an AIDL interface B. Class A extended B.Stub & overridden all xyz methods that presents in B.
Created new Instance of class A & passed inside Bundle putBinder() api & started Activity via package name & class name
Client App:
Now I have received class A IBinder object inside the Fragment onCreate() via Activity through getBinder.
Initialized AIDL B instance by using B.Stub.asInterface(class A IBinder object).
The moment I try to call the AIDL B apis from fragment via the AIDL instance, it throws AbstractMethodError(Means method implementation is not present).
Could anyone help me to understand, is this the right way to call the AIDL Apis? If not how to bind to class A from Fragment ?
Upvotes: 0
Views: 72