i think, the line intent.putExtra("com.google.zxing.client.android.SCAN.SCAN_MODE","QR_CODE_MODE"); should be replaced with intent.putExtra("barcode","QR_CODE_MODE");
if you want to generate the QR code, only if the Contact has ph. no., make sure the Contact's phone number is not null and only then call the intent to encode
private static String massageContactData(String data) { // For now -- make sure we don't put newlines in shared contact data. It // messes up // any known encoding of contact data. Replace with space. if (data.indexOf('\n') >= 0) { data = data.replace("\n", " "); } if (data.indexOf('\r') >= 0) { data = data.replace("\r", " "); } return data; }
@ErumHannan, I think this line will get you address. methodsCursor .getString(methodsCursor .getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS));
@ErumHannan, For Address - You have in the code. Check the lines above the line bundle.getString(ContactsContract.Intents.Insert.POSTAL); I think for COMPANY you have do similar.. Its been a while since i did it. I don't remember it now
@ErumHannan, I think you have to add the imageUri to a bundle object and send that, like this, for ex., Bundle bundle = new Bundle(); if (name != null && !name.isEmpty()) { bundle.putString(ContactsContract.Intents.Insert.NAME, massageContactData(name)); }