package willy.individual.com.minilinkedinapp.models;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.UUID;

/**
 * Created by zhenglu on 2/18/17.
 */

public class BasicInfo implements Parcelable{

    public String id;

    public String userName;

    public String email;

    // TODO Image

    public BasicInfo() {
        id = UUID.randomUUID().toString();
    }

    protected BasicInfo(Parcel in) {
        id = in.readString();
        userName = in.readString();
        email = in.readString();
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(id);
        parcel.writeString(userName);
        parcel.writeString(email);
    }

    public static final Creator<BasicInfo> CREATOR = new Creator<BasicInfo>() {
        @Override
        public BasicInfo createFromParcel(Parcel in) {
            return new BasicInfo(in);
        }

        @Override
        public BasicInfo[] newArray(int size) {
            return new BasicInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }
}

@@ -47,16 +47,40 @@
 odels;%0A%0A
+import android.net.Uri;%0A
 import a
@@ -97,16 +97,16 @@
 Parcel;%0A
-
 import a
@@ -328,21 +328,28 @@
     
-// TODO Image
+public Uri imageUri;
 %0A%0A  
@@ -549,32 +549,98 @@
 n.readString();%0A
+        imageUri = in.readParcelable(Uri.class.getClassLoader());%0A
     %7D%0A%0A    @Over
@@ -768,16 +768,16 @@
 rName);%0A
-
         
@@ -803,16 +803,61 @@
 email);%0A
+        parcel.writeParcelable(imageUri, i);%0A
     %7D%0A%0A 

Implement BasicInfo class