Hi,

I am using RPC Mechanism using AIDL in my Client Service Application.
Here is how my classes are structurized @ Service
class A implements parceable{
String message;
......
}
class B implements parceable{
String message;
......
}

class C implements parceable{
A a;
B b;

@Override
public C createFromParcel(Parcel in) {
        A dsc = in.readParcelable(DiscoveryInfo.class.getClassLoader());
        B ply = in.readParcelable(Policy.class.getClassLoader());
        return new C(a,b);
}

@Override
public void writeToParcel(Parcel outParcel, int flags) {
        outParcel.writeParcelable(a, 0);
        outParcel.writeParcelable(b, 0);
}

AIDL Interface
interface IMyService {

        /* A simple Method for gettingCClassInformation with MyService */
        C getCClassInformation();
}

Following are the queries
1.) Do I Need to Implement Parceable Interface in each class i.e A & B
or Only Implementing Parceable Interface at C works (as i am getting
error).
2.) How to Write or Read Parceable Objects in writeToParcel/
CreateFromParcel/ReadParcel Function.
3.) How to extract the Information of Class A & B from C class at the
Client End using this Mechanism.

Any reference would be helpful.
Thanks in Advance.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to