I'm trying to add a vCard from a web link to the user's contact list on Android 2.2. When I direct the user to .vcf file, all I get is text output in the mobile browser. I have confirmed that the files is being transferred with MIME type text/v-card. This seems like it should be pretty simple to do. Any ideas?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I had problems with importing
VERSION:4.0
vcard file on Android 7 (LineageOS) with the standard Contacts app.Since this is on the top search hits for "android vcard format not supported", I just wanted to note that I was able to import them with the Simple Contacts app (Play or F-Droid).
AFAIK Android doesn't support vCard files out of the Box at least not until 2.2.
You could use the app vCardIO to read vcf files from your SD card and save to you contacts. So you have to save them on your SD card in the first place and import them afterwards.
vCardIO is also available trough the market.
Just to let you know: I just tried it using a vCard 2.1 file created according to the vCard 2.1 spec. I found that vCard 2.1, despite being an old version, already covered everything I needed, including a base64-encoded photo and international character sets.
It worked perfectly on my unmodified Android 4.1.1 device (Galaxy S3). It also worked on an old iPhone 3GS (iOS 5, via the Evernote app) and a coworker's unmodified old Android 2.1 device. You only need to set the
Content-disposition
toattachment
as suggested above.A minor problem was that I triggered the VCF download using a QR code, which I scanned with the Microsoft Tag app. That app told me Android couldn't handle the
text/x-vcard
media type (or justtext/vcard
, no matter). Once I opened the link in a Web browser (I tried Chrome and the Android default browser), it worked fine.This can be used to download the file to your SD card Tested with Android version 2.3.3 and 4.0.3
======= php =========================
======= html ========================
There is now an import functionality on Android ICS 4.0.4.
First you must save your
.vcf
file on a storage (USB storage, or SDcard). Android will scan the selected storage to detect any.vcf
file and will import it on the selected address book. The functionality is in the option menu of your contact list.!Note: Be careful while doing this! Android will import EVERYTHING that is a
.vcf
in your storage. It's all or nothing, and the consequence can be trashing your address book.What i have also noticed is that you have to save the file as
Unicode
,UTF-8
, noBOM
in an Windows format withCRLF
(Carriage Return, Line Feed). Because if you don't, the import will break. (Saying something about weird chars in the file)Good luck :) Sid