0

Can I somehow receive a response when I insert vCard into the phone?

This is what I've done.

    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.setDataAndType(Uri.fromFile(file), "text/x-vcard");
    startActivityForResult(intent, CONTACT_REQUEST);

Unfortunately, it immediately returns RESULT_CANCELED.

Lau
  • 1,804
  • 1
  • 23
  • 49
  • have you get any hint over https://stackoverflow.com/a/4381866/5049244 – Arnold Brown Jul 25 '17 at 13:57
  • [How to import contacts from VCF file by using code](https://stackoverflow.com/questions/10696873/how-to-import-contacts-from-vcf-file-by-using-code/11312507#11312507) – RonTLV Jul 25 '17 at 15:07
  • Unfortunately, I cannot insert those contacts using content provider - I have to use intent. – Lau Jul 26 '17 at 08:24

0 Answers0