I'm trying to use the readBooleanArray from android.os.Parcel, but readBooleanArray returns void and therefor it's unclear to me how to use this method.
I'm using the following method to write something to the Parcel:
public void writeToParcel(Parcel out, int flags) {
out.writeBooleanArray(new boolean[] {value});
}
How should this value be obtained in the Parcelable constructor?
I believe you need to pass a boolean[], the values in the Parcel will be copied to that, then you read from that array.
Sample code:
boolean[] myBooleanArr = new boolean[1];
parcel.readBooleanArray(myBooleanArr);
boolean value = myBooleanArr[0];