Finally after searching for an application writting and reading Business card on NFC tag and finding nothing. I decided to create my own kind of business card and read it myself. here is the code i used to write the card using Ndef Message :
Bitmap mBitmap = mPhoto;
ByteArrayOutputStream stream = new ByteArrayOutputStream();
mBitmap.compress(Bitmap.CompressFormat.JPEG, 80, stream);
byte[] byteArray = stream.toByteArray();
NdefRecord picRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA, "image/jpeg".getBytes(), null, byteArray);
String informations = "name: "+name + "\ntitle: " + title + "\naddress: "+ address + "\ncity: "+ city + "\nphone: "+ phone + "\nmail: "+mail + "\n";
NdefRecord textRecord = createTextRecord(informations);
NdefMessage message = new NdefMessage(new NdefRecord[]{picRecord, textRecord});
and here is the code for the reading part :
NdefRecord picRecord = records[0];
NdefRecord infoRecord = records[1];
byte[] picload = picRecord.getPayload();
byte[] infoload = infoRecord.getPayload();
Bitmap photo = BitmapFactory.decodeByteArray(picload, 0, picload.length);
String textEncoding = ((infoload[0] & 0200) == 0) ? "UTF-8" : "UTF-16";
int languageCodeLength = infoload[0] & 0077;
String text = null;
try{
String languageCode = new String(infoload, 1, languageCodeLength, "US-ASCII");
text = new String(infoload, languageCodeLength + 1,infoload.length - languageCodeLength - 1, textEncoding);
}catch(Exception e){
Alert("String decoding", e.toString());
return;
}
The Jpeg encryption helps a lot to compress the image without loosing too much quality. The transfer on the tag take 2-3 seconds but the solution works well.