title: How can I act with Android app as MIFARE card?
body: <p>How can I send an NDEF message from phone to MIFARE card reader?</p>
  
  <p>On the reader side I use this code from <a href="https://github.com/AlterCodex/nxppy" rel="nofollow noreferrer">https://github.com/AlterCodex/nxppy</a>:</p>
  
  <pre><code>import nxppy
  import ndef
  
  # Instantiate reader
  mifare = nxppy.Mifare()
  
  # Select tag
  uid = mifare.select()
  
  # Read NDEF data
  ndef_data = mifare.read_ndef()
  
  # Parse NDEF data
  ndef_records = list(ndef.message_decoder(ndef_data))
  </code></pre>
  
  <p>When I try to send an NDEF message with this code I get memory error:</p>
  
  <pre><code>    public NdefMessage CreateNdefMessage(NfcEvent e)
      {
          NdefRecord uriRecord = NdefRecord.CreateUri("http://myURL");
          NdefMessage message = new NdefMessage(new[] { uriRecord });
          return message;
      }
  </code></pre>
  
  <p>For this code I am getting error: ndef_data = milfare.read_ndef() MemoryError.</p>
  
  <p>How can I edit this solution to make it work? I just want to read a simple NDEF message from Android application with nfc-explorer board but I am completly confused how to do this.</p>