title: Writing an image using NdefMessage
body: <p>I am trying to write an image on a Ndef Tag, currently, i am able to write it, but when I try to read it with any market application, they treat it like a text message. here is my piece of code writing the image :</p>
  
  <pre><code>        Bitmap mBitmap = Bitmap.createScaledBitmap(mPhoto, 100, 100, true);
          ByteArrayOutputStream stream = new ByteArrayOutputStream(); 
          mBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
          byte[] byteArray = stream.toByteArray();
          NdefRecord picRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA, "image/png".getBytes(), null, byteArray);
          String informations = "name: "+name + "\ntitle: " + title + "\naddress: "+ address + "\ncity: "+ city + "\nphone: "+ phone + "\nmail: "+mail;
          NdefRecord textRecord = createTextRecord(informations);
          NdefMessage message = new NdefMessage(new NdefRecord[]{picRecord, textRecord});
  </code></pre>
  
  <p>i also tryed writting the image this way :</p>
  
  <pre><code>        NdefMessage msg = new NdefMessage(new NdefRecord[] {createMimeRecord("image/png", byteArray), textRecord});
  </code></pre>
  
  <p>with the method createMimeRecord :    </p>
  
  <pre><code>        public NdefRecord createMimeRecord(String mimeType, byte[]payload) {
          byte[] mimeBytes = mimeType.getBytes(Charset.forName("USASCII"));
          NdefRecord mimeRecord = new
          NdefRecord(NdefRecord.TNF_MIME_MEDIA,
          mimeBytes, new byte[0], payload);
          return mimeRecord;
          }
  </code></pre>
  
  <p>Here is the result i get when trying to read my image with applications like "TagInfo" :<img src="https://i.stack.imgur.com/rMqG6.png" alt="enter image description here"></p>
  
  <p>The text message is well writen and can be read normally. I've tried to use the "createMime(String mime type, byte[] data) but this method seems "undefined".I've tried to compress the bitmap image in Jpeg format with the same result. Also I've tried to find examples of sending images via NdefMessages, but didn't find any. Any suggestion ?</p>