我在一个特定的aidl文件夹中有两个.adil接口,但是它也无法识别我的文件。我已按照以下步骤操作: I have followed these steps in stackoverflow
我的.aidl文件是:
interface IControllerInterface {
/**
* Init IPCController.
* @param cmd_type Only support Wearable SDK Controller CMD_8 or CMD_9
* @param tagName Controller Tag
*/
int init(int cmd_type, in String tagName);
/**
* Send bytes to Wearable.
* @param tagName Controller Tag, use your IPCController init tag.
* @param cmd command string, like "yahooweather yahooweather 1 0 0 "
* @param dataBuffer byte type of data, like "".getBytes()
* @param priority default PRIORITY_NORMAL, if set as PRIORITY_HIGH, this session
* will get top priority to send.
*/
long sendBytes(in String tagName, String cmd, in byte[] data, int priority);
/**
* Return connection state.
*
* @see WearableManager#STATE_NONE
* @see WearableManager#STATE_LISTEN
* @see WearableManager#STATE_CONNECT_FAIL
* @see WearableManager#STATE_CONNECT_LOST
* @see WearableManager#STATE_CONNECTING
* @see WearableManager#STATE_CONNECTED
* @see WearableManager#STATE_DISCONNECTING
*/
int getConnectionState();
/**
* Destroy the IPCController.
*/
void close(String tagName);
/**
* register IControllerCallback for the "tagName" IPCController.
*/
void registerControllerCallback(in String tagName, in IControllerCallback callback);
/**
* unregister IControllerCallback for the "tagName" IPCController.
*/
void unregisterControllerCallback(in String tagName, in IControllerCallback callback);
/**
* get SmartDevice APK remote Bluetooth device Name.
*/
String getRemoteDeviceName();
}
这是我上课的地方,需要扩展它:
private class ControllerBinder extends IControllerInterface.Stub {
}
答案 0 :(得分:0)
我已经用Android Official documentation完成了此操作。并找到了问题的根本原因。在上面发布的代码中,我的案例中使用了另一个aidl接口。 IControllerInterface 无法找到 IControllerCallback 接口。 请让我知道如何将一个辅助界面访问另一个辅助界面。