在我的代码下面:
public interface Callback<T extends Response> extends Serializable{
void onSuccess(T response);
void onFail(String errMsg);
}
和
public class Response implements Serializable{
public String mValue1;
}
和
public class ResponseEx extends Response implements Serializable{
public String mValue2;
}
所以,我的主要代码是:
public class TestActivity extends Activity{
Callback<ResponseEx> callback = new Callback<ResponseEx>() {
@Override
public void onSuccess(ResponseEx response) {
}
@Override
public void onFail(String errMsg) {
}
}
Intent intent = new Intent("ACTION");
intent.putExtra("KEY", callback);
startService(intent); //onFail
}
我不知道如何解决这个问题......有人帮助我!TT