我正在尝试使用 Android AIDL 在 Eclipse 中创建远程服务。我在 /src 中创建了我的 AIDL 文件 IRemoteService.aidl,如下所示:
package com.vtrandal.bluesentry;
interface IRemoteService {
String getData();
}
构建完成后,我在 /gen 中获得了一个巨大的文件 IRemoteService.java,其中包含以下这些类和方法(它与我在文档中看到的任何内容都不相似):
public interface IRemoteService extends android.os.IInterface
public static abstract class Stub extends android.os.Binder implements com.vtrandal.bluesentry.IRemoteService
private static final java.lang.String DESCRIPTOR = "com.vtrandal.bluesentry.IRemoteService";
public Stub()
public static com.vtrandal.bluesentry.IRemoteService asInterface(android.os.IBinder obj)
public android.os.IBinder asBinder()
public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
private static class Proxy implements com.vtrandal.bluesentry.IRemoteService
Proxy(android.os.IBinder remote)
public android.os.IBinder asBinder()
public java.lang.String getInterfaceDescriptor()
public java.lang.String getData() throws android.os.RemoteException
public java.lang.String getData() throws android.os.RemoteException;
那么为什么 IRemoteService.java 包含这么多文档中没有提到的垃圾呢?我怎么可能知道如何处理这一切?我怎么可能知道如何处理它?