1.导入对应的jar 前两个是辅助,第三个是实现功能的jar
2.gradle中引入文件
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation files('libs/vendor.skyworth.hardware.boardinfo-V1.0-java-shallow.jar') implementation files('libs/framework.jar') api files('libs/android.hidl.base-V1.0-java.jar')
3.客户端调用
IBoard service = IBoard.getService(true); service.getHwInfo(ComponentType.FLASH, new IBoard.getHwInfoCallback() { @Override public void onValues(int i, String s) { Log.e("TAG",s); } });