I've accidentally made (and distributed) a QR code to a URL (important: not a VCARD data set like below). So now I need to redirect visits from the URL "directly" to the VCARD data:
BEGIN:VCARD
VERSION:3.0
N:Doe;John;
FN:John Doe
TEL;TYPE=CELL:54321
END:VCARD
I say "directly" in the sense that iPhones happily offer to save the contact if the URL is to a .vcf file but, based on my tests, androids don't and instead need to have the QR code go "directly" to the data set (I don't know another way to get an android to directly prompt to save the contact?).
I studied some related posts but they talk about getting the android user to first download a VCARD file or an app or generate a .vcf file which is not my situation as my URL already goes straight to a .vcf file.
I don't know for sure whether it's possible to get the android to prompt to save a contact if I return the VCARD data set through redirecting to a page with some magical PHP functions.
Because the androids don't prompt to save a contact upon visiting xyz.com/jd.vcf, I need to "redirect" that to the VCARD data set - but given that it isn't a "URL" I can't redirect to it.
header('Content-Type: text/x-vcard'); echo file_get_contents("/path/to/vcard.vcf");
, with that approach it still prompted me to download a file first, so thats why I said I didn't think it could be done. Maybe I screwed up a header or something. Glad you got it working! – Thurmanthurmann