I am trying to extend the implementation of HAL functionality. It seems that once HAL interface is published, we cannot made any changes in that version. So I tried to do interface inheritance by referring here https://source.android.com/devices/architecture/hidl-java#extensions.
IA.HAL File
interface IA{
Amethod();
};
ClientService.Java file
IA ia = IA.getService(true);
//ia is not null. Working fine
For extension, I created a new HAL file which involves interface inheritance as below.
IB.HAL file
import IA;
interface IB extends IA{
Bmethod()
};
ClientService.Java file
IA ia = IA.getService(true);
//ia is not null. Working fine
IB ib = IB.castFrom(ia);
**// ib is null. Issue**
Any idea what I am doing wrong. Thanks in advance.
A HAL server is identified by its interface name and its instance name. Could it be that the server providing
IAis still running?You might have the following setup at the moment:
/system/bin/ia-serviceIA"default"/vendor/bin/ib-serviceIB"default"The default for
getServiceis to use"default"as instance.Solutions:
ia-serviceis not started."new") by callingregisterAsService("new")inib-serviceand get the instance with ```getService("new", true)````in your client.