I'm working on a project that involves the generation of a qr-code
encoded with the contact information on a business card. The contact
info and the qr-code should than be printed together on a business
card. If done as described, it doesn't work with most phones due to
the data density on the code. Most phones aren't able to decode 2d-
codes that complex. The workaround consists in generating a simple qr-
code encoded with only a url. Being less complex, the phone has no
problem reading the qr-code, which sends the phone's browser to a page
where the user can click a link that downloads the vcard info to the
phone's contacts list.
My problem is with the last part. So far I have only been able to
download a .vcf file to the phone's file system, but no to write the
cards content into the contacts list.
Can somebody point me to resources where I can research how to solve
this? Any input is highly appreciated.
Eduardo Frank
VCF was invented as a serialised contact exchange format - your best bet is to let the phone "do the right thing" with the vcard. Not to mention that you couldn't code anything anyway to do it from within a browser because that would break the inherent security model present in HTTP - the only way you could inject right into a devices contact list would be to have a custom client-side application installed that had permission to local resources (for instance, the iphone SDK has a contacts api)
Cheers, Tim
> --
> You received this message because you are subscribed to the Google Groups "XMPie Interest Group" group.
> To post to this group, send email to xmpie...@googlegroups.com.
> To unsubscribe from this group, send email to xmpie-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xmpie-users?hl=en.
>
>
Here is another example: http://www.mskynet.com/static/QRGenAPI/#bgcol
These people have a Blackberry only solution and a more agnostic one
too.
I would be content if I get it working at least with the Blackberry.
Cheers
Eduardo
95% of all mobiles know what to do when receiving a VCF card, so that
would then negate a vendor tie in.
Thoughts?
Cheers, Tim
your proposal is certainly a good idea. Most phones can handle a .vcf
attached to a text message. The downside for me is that in our shop we
lack the infrastructure to send SMS. We've never done it and hence we
don't know what is necessary to get such a service going. I'll look
into it.
Cheers
Eduardo
I have a working solution in php. As discussed, a simple qr-code on
the business card sends you to a web site.
There you have a link to download the vcard. Clic that link and a
script fetches the vcard file and offers it as an attachment to be
downloaded.
It works on my BlackBerry and it might be completely 'agnostic', since
it is xhtml.
Here is the code:
this is the webpage wihich url is encoded in the 2d barcode
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>vcard Page</title>
</head>
<body>
<a href="get_vcard.php?path=vcard.vcf">Download vcard</a>
</body>
</html>
This is the script get_vcard.php
<?php
$filename = $_GET['path'];
$save_as = basename($filename); // this is the name the user sees.
$c_type = 'text/x-vcard';//what file type?
$file_size = filesize("$filename");
if ($fp = fopen("$filename", 'rb')) {
Header('Content-Type: '. $c_type); // this depends on file type!!!
Header('Content-Disposition: attachment; filename="'.
$save_as.'"');
Header('Content-Length: '.$file_size);
fpassthru($fp);
} else {
echo"cannot find file: <b>$filename</b>";
}
?>
It is not yet database driven, but it serves as a proof of concept.
To make it an xmpie project, I need now to translate the script into
asp, which I don't know enough of.
Can somebody recommend me a web page where to start learning to code
asp for xmpie.
Thanks a lot
Eduardo
On Feb 7, 7:47 am, Timothy Perrett <timo...@getintheloop.eu> wrote: