title: Is this the right way to pass a Period class through a Parcelable
body: <p>I have a class that implements a Parcelable, but it had only primitive types as members.</p>
  <p>Until now, I passed an instance of this class  as a Parcelable without problem between two activities.</p>
  <p>But I'm adding a member which type is a Period (java.time).</p>
  <p>Doing my research on internet I found that passing a member object (not parcelable) of a class that implements a parcelable, I should pass actually the fields of this object (primitive types or String) through the parcelable and not the whole object (since it's not implementing the parcelable)</p>
  <p>Looking at the documentation, the Period class doesn't implement Parcelable.</p>
  <p>So, would be this the right way to pass it  through a Parcelable?</p>
  <pre><code>Period objPeriod;
  
  public void writeToParcel(Parcel out, int flags){
      out.writeString(objPeriod.toString());
  }
  
  private MyClass(Parcel in){
      objParcel.parse(in.readString());
  }
  </code></pre>