title: How to Pass a List of Objects from activity A to activity B in Kotlin?
body: <p>I have 2 Activities, I want to pass an arraylist of an Object and show it on a ListView</p>
  
  <blockquote>
    <p>Activity A:</p>
  </blockquote>
  
  <pre><code>     btnGuardar.setOnClickListener{
  
                  if(edtNombre.text.toString().equals("") || 
                       edtApellido.text.toString().equals("") || 
                       edtFecha.text.toString().equals("")){
  
                      Toast.makeText(this@Main2Activity, "Debes llenar todos los campos!", Toast.LENGTH_SHORT).show()
                  }else{
                      var estadoSel : String
                      estadoSel = estado.onItemSelectedListener.toString()
                     var per = Persona(edtNombre.text.toString(),edtApellido.text.toString(),estadoSel,edtFecha.text.toString())
                      personas.add(per)
                      val intent = Intent(this@Main2Activity,Main3Activity::class.java)
                      //intent.putExtra("Personas",  personas as Serializable)
                      intent.putParcelableArrayListExtra("Personas", ArrayList(personas))
                      edtFecha.text = null
                      edtApellido.text = null
                      edtNombre.text = null
                      estado.setSelection(0)
                      Toast.makeText(this@Main2Activity, "Registro Guardado", Toast.LENGTH_SHORT).show()
                  }
              }
  </code></pre>
  
  <blockquote>
    <p>Activity B:</p>
  </blockquote>
  
  <pre><code> override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main3)
          supportActionBar?.setDisplayHomeAsUpEnabled(true)
          //val intent = Intent()
          val bundle = getIntent().extras
          var arr  = bundle?.getParcelableArrayList&lt;Persona&gt;("Personas")!!
          //var arr : ArrayList&lt;Persona&gt; = (ArrayList&lt;Persona&gt;())intent.getSerializableExtra("Personas")
          //intent.getSerializableExtra("Personas")
          //arr = intent.extras!!.get("Personas")
          val adapter = ArrayAdapter(this, android.R.layout.simple_list_item_1, arr)
          listaPersonas.adapter = adapter
      }
  </code></pre>
  
  <p>But I'm getting a Null Pointer Exception</p>