title: How to store array in firestore database using Android?
body: <p>I want to create an firestore model like below:</p>
  
  <pre><code>attendance_log (root collection)
  |
  |--- 001 (document ID)
  |    |
  |    |--- date : 20190310
  |    |--- time : 1025
  |    |--- subject : "Android Programming"
  |    |--- present : {"MCA01", "MCA03", "MCA04"}
  |    |--- absent : {"MCA02, "MCA05"}
  </code></pre>
  
  <p>I could store date, time and subject by passing the value in a Map as below :</p>
  
  <pre><code>Map&lt;String, Object&gt; attend = new HashMap&lt;&gt;();
  attend.put("date", d) ;
  attend.put("time", t) ;
  attend.put("subject", subject) ;
  
  db.collection("attendance_log")
      .document(docID)
      .set(attend)
      .addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {
          @Override
          public void onSuccess(Void aVoid){
              Toast.makeText(TakeAttendance.this,"Attendance added sucessfully" , Toast.LENGTH_LONG).show();
          }
      }).addOnFailureListener(new OnFailureListener() {
  
      @Override
      public void onFailure(@NonNull Exception e) {
          Snackbar.make(findViewById(R.id.cdlayout) ,"Something went wrong!", Snackbar.LENGTH_LONG).show();
      }
  });
  </code></pre>
  
  <p>But passing the array generates the error</p>
  
  <pre><code>java.lang.IllegalArgumentException: Could not serialize object. Serializing Arrays is not supported, please use Lists instead
  </code></pre>